Skip to content
Ryan Deas edited this page Sep 13, 2017 · 1 revision

Cache

There is a robust caching system in place in this project that means that any images that are generated are stored on the server and returned from there if the same image size is requested in the future. This makes loading times in the milliseconds.

Settings

validate_image - Flag to set whether or not original images last modified times should be compared to the cache files last modified times. This means that if the original image is updated in any way. Say it is deleted and replaced with another image of the same name, if this flag is set to false, the cache image will be returned as the image exists in cache. If set to true the cache image will be deleted and the new image will be generated as normal. By default this fag is set to true.

invalidate_cache - Integer value to store amount of time, in seconds, that needs to pass before the cache image is deleted. If this value is set to 86400 for example. The cached image will be deleted 24 hours after it is generated. This means that you can set the cache to be updated after x amount of time.

Clone this wiki locally