Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1509)

Unified Diff: mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom

Issue 1351693007: Add invalidation to url_response_disk_cache. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | services/url_response_disk_cache/url_response_disk_cache_db.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom
diff --git a/mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom b/mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom
index a6c7a2227bfcf24d24beefb6aa9322002f6ac00c..abeb62f7d30b73bb56995e8e7db730449ac81e63 100644
--- a/mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom
+++ b/mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom
@@ -24,11 +24,18 @@ interface URLResponseDiskCache {
// to store content. This service guarantee that |cache_dir_path| will be
// emptied when |file_path| content changes. For example, a content handler
// that is backed by a VM that compiles files could have the VM use this
- // directory to cache the compiled files.
+ // directory to cache the compiled files. After |Get| has been called and a
+ // response is returned, the caller must call |Validate| or |Update| to
+ // revalidate the entry. If this is not done, a future call to |Get| may
+ // return null.
Get(string url) => (mojo.URLResponse? response,
array<uint8>? file_path,
array<uint8>? cache_dir_path);
+ // Validate the cache for the given |url|. This will enforce that |Get| will
+ // return an entry if it exists.
+ Validate(string url);
+
// Update the cache with the given response.
Update(mojo.URLResponse response);
« no previous file with comments | « no previous file | services/url_response_disk_cache/url_response_disk_cache_db.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698