I think I had this conversation before, but I'm wondering if it's possible to cache custom data. Specifically, I'm looking to build some image manipulation output filters (e.g. to automatically make and cache resized images).
I can figure out all the PHP image resizing pretty easily, and it looks like I can write the path to the new images using the MODX cache manager:
http://rtfm.modx.com/display/revolution20/Caching
But will that work? E.g. imagine an output filter like this:
[[*path_to_my_image:thumbnail=`150x200`]]
So the output filter gets an image path as input, e.g.
http://path/to/my.jpg... is there a "correct" way to write the new file to the MODX cache directory? Can I just use the modFileHandler service to write the file to the cache directory (
http://rtfm.modx.com/display/revolution20/modFileHandler)? Once the file has been moved into some directory inside of the cache directory, I can use the cache manager to store the path to the image and refresh it as needed, but do I also need to handle the OnBeforeCacheUpdate event to clear out the custom image directory I created inside of the cahce directory?