Some resources that you can use:
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwi…
is the proper way of creating caches. You declare an @Inject dependency on
that, then use the createNewCache method (if you don't plan on running a
cluster, or don't think that the cached resources should be shared inside a
cluster, then it's slightly better for performance to call
createNewLocalCache). You can then use this cache to store some entries.
https://github.com/xwiki/xwiki-commons/blob/master/xwiki-commons-core/xwiki…
is going to give you the location of the temporary storage directory.
Combine this with
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwi…
and you have a nice way of serving image files stored on the disk to the
HTTP client. Unfortunately, this way you have to implement your own LRU
functionality and make sure you clean up files, otherwise you'll keep
filling up the disk with temporary files.
That's brilliant - thanks for those, I'll go and do some reading now.
Paul.