uoregon-libraries / rais-image-server

RAIS: A IIIF-compliant, 100% open source image server for blazing-fast deep zooming
Creative Commons Zero v1.0 Universal
78 stars 6 forks source link

Make caching pluggable #13

Open jechols opened 6 years ago

jechols commented 6 years ago

It would be excellent if the caching layer were a set of plugin hooks rather than a hard-coded option. The current in-memory 2Q LRU cache could be a default plugin, much like the S3 plugin, but it would be great if we could just drop in plugins at will so that if, for instance, the in-memory cache doesn't find something, a redis cache could be hit, or a filesystem cache, or whatever.

On the flip side, though, there's currently no way to purge all "things" related to a single file (e.g., if you cache half the tiles for a given JP2, then change the JP2, the tiles served by RAIS could be really weird). If we start offering up more long-lived cache options, this might need to be addressed, or at least spelled out very clearly.