rdflib.js icon indicating copy to clipboard operation
rdflib.js copied to clipboard

Caching Solid ACL group listings

Open kjetilk opened this issue 6 years ago • 2 comments

In Solid, we want to be able to be able to cache group listings used for ACLs: Tim wrote:

if you store stuff in RDFlib, then it will be cached for next time if you keep the same quad store. The metadaa from the headers isalso cached so one could check the expiry daye in the header and refresh it if past the expiry date. How to manage expiry dates on group listtings? While the group is changing maybe they should be set to 10 minutes, and then if it becomes static changed to a day or something ..

and

rdflib.js has code to refresh the quadstore for a document. It doesn’t deal with expiry date. My preference would be to write the code to check the expiry date and if necessary call the refresh function, and then migrate it into rdflib fetcher.js

kjetilk avatar Jul 09 '18 17:07 kjetilk

https://github.com/linkeddata/rdflib.js/pull/241 adds a Fetch method refreshIfExpired It refreshes also if there is no record of the expiry date. No test for it yet

timbl avatar Sep 10 '18 17:09 timbl

Using this issue as a way to discuss cache related issues a bit more broadly, functionality which would be useful includes

  • Remove old cached documents from the store as a function of age since loaded (and size?)
  • Remove old cached documents from the store as a function of age since last used ?? (we don't currently track last-used times)
  • Refresh a cache after it is used rather than before, if is is quite fresh anyway, for speed of use
  • Refresh old documents (or remove from cache) as a function of HTTP expiry date on the document

There are probably others.

timbl avatar Aug 19 '20 16:08 timbl