Closed BusinessClick closed 1 week ago
Thanks @BusinessClick for your feedback.
Today intervention-request does not handle generated assets cache purge itself. But feel free to create a pull-request adding the CLI Command. Public HTTP API should not call any internal methods to clean all cache or single image cache, it should be handled using CLI or from your own application logic.
Concerning cleaning a specific file cache: you should change its path instead of purging an existing file.
For example, if you replaced an image file from your application, it should change its path to avoid intervention-request cache but also browser and any reverse-proxy caches. From /files/12e32a/my-image.jpg
to /files/291e82/my-image.jpg
.
Both of your requests are more related to filesystem scope rather than intervention-request scope. That's why I'd prefer to handle these at the upper level: in your application logic (if you are using InterventionRequest as a library).
Great work! Do you implemented Cache Clean methods?