You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to check if a resource has already been cached. Maybe we can have a has method or a getMeta method that only returns the metadata without the binary file? Also, we need a method to refresh a cache i.e. to update the expire tag of the resource.
Other questions:
What will happen when the size limit is reached?
What will happen when the count limit is reached?
Is it possible to use unlimited size and count?
The text was updated successfully, but these errors were encountered:
After working on #19. I found that what I really need is the ability to save metadata (file size, name, etc) along with the binary. For example:
// getting the metadatatry{returnawaitcache.getMeta(key);}catch(err){}const{resource, meta}=awaitfetchResource(key);awaitcache.set(key,resource);awaitcache.setMeta(key,meta);// it will be better to set both the resource and the metadata at once// e.g. cache.add({key, value: resource, meta})returnmeta;
I want to check if a resource has already been cached. Maybe we can have a
has
method or agetMeta
method that only returns the metadata without the binary file? Also, we need a method to refresh a cache i.e. to update theexpire
tag of the resource.Other questions:
size
limit is reached?count
limit is reached?size
andcount
?The text was updated successfully, but these errors were encountered: