| Index: ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_set.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_set.js b/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_set.js
|
| index 15f4693999b83e94fd74f92efe89d79f14d250c7..fb31d427950081f4d45546776aa51fe95f1daa94 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_set.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_set.js
|
| @@ -103,6 +103,16 @@ MetadataCacheSet.prototype.invalidate = function(requestId, entries) {
|
| };
|
|
|
| /**
|
| + * Clears the caches of entries.
|
| + * @param {!Array<!FileEntry>} entries
|
| + */
|
| +MetadataCacheSet.prototype.clear = function(entries) {
|
| + for (var i = 0; i < entries.length; i++) {
|
| + this.items_.remove(entries[i].toURL());
|
| + }
|
| +};
|
| +
|
| +/**
|
| * Creates snapshot of the cache for entries.
|
| * @param {!Array<!FileEntry>} entries
|
| */
|
| @@ -162,6 +172,12 @@ MetadataCacheSetStorage.prototype.peek = function(url) {};
|
| MetadataCacheSetStorage.prototype.put = function(url, item) {};
|
|
|
| /**
|
| + * Removes an item from the cache.
|
| + * @param {string} url Entry URL.
|
| + */
|
| +MetadataCacheSetStorage.prototype.remove = function(url) {};
|
| +
|
| +/**
|
| * Implementation of MetadataCacheSetStorage by using raw object.
|
| * @param {Object} items Map of URL and MetadataCacheItem.
|
| * @constructor
|
| @@ -194,6 +210,13 @@ MetadataCacheSetStorageForObject.prototype.put = function(url, item) {
|
| };
|
|
|
| /**
|
| + * @override
|
| + */
|
| +MetadataCacheSetStorageForObject.prototype.remove = function(url) {
|
| + delete this.items_[url];
|
| +};
|
| +
|
| +/**
|
| * Implementation of MetadataCacheSetStorage by using LRUCache.
|
| * @param {!LRUCache<!MetadataCacheItem>} cache LRUCache.
|
| * @constructor
|
| @@ -230,6 +253,13 @@ MetadataCacheSetStorageForLRUCache.prototype.put = function(url, item) {
|
| };
|
|
|
| /**
|
| + * @override
|
| + */
|
| +MetadataCacheSetStorageForLRUCache.prototype.remove = function(url) {
|
| + this.cache_.remove(url);
|
| +};
|
| +
|
| +/**
|
| * @param {!FileEntry} entry Entry
|
| * @param {!Array<string>} names Property name list to be requested.
|
| * @constructor
|
|
|