6.9 Clearing the image cache

The Goobi viewer maintains separate image caches for normal image display and thumbnails. Both caches are based on Ehcache.

Basically, the number of elements contained in each cache is limited, and newly added images displace the oldest cached images. Sometimes, however, it may be necessary to empty the cache specifically for individual records (if, for example, its images have changed, but the old images from the cache are still displayed).

A servlet is available in the Goobi viewer for this purpose, which makes this function available. To delete a record from the cache, the following URL must be called with the appropriate parameters:

https://viewer.example.org/viewer/cache?action=emptyCache&identifier=PPN123456789&fromContent=true&fromThumbs=true&fromPdfs=false

Parameter

Description

action

Always emptyCache

identifier

The identifier of the record whose images are to be removed from the cache.

fromContent

If true, the corresponding images are removed from the cache for normal image view. Default value is false.

fromThumbs

If true, the corresponding images will be removed from the thumbnail cache. Default value is false.

fromPdfs

If true, the corresponding PDF files are removed from the cache. Default value is false.