Cache driver
You can create your own custom cache drivers by extending one of the existing drivers or the base Cache
class.
Extending an existing cache driver
To modify only parts of an existing driver like the FileCache
, you can extend that class and selectively overwrite individual methods, e.g. the flush()
method in this example:
You then have to register the new cache type with Kirby's plugin wrapper:
Extending the Cache
class
Alternatively, you can extend the Cache
class to implement a new cache driver.
As before, you have to register the new cache driver: