I'm storing and caching images with link like this
http://example.com/1.jpg
http://example.com/2.jpg
Users have ability to modify and overwrite 1.jpg
or 2.jpg
. So what I want to cache all images but update the cache of that image file which is just over-written.
Right now I'm using .htaccess
method for cache
<IfModule mod_expires.c>
ExpiresActive On
<FilesMatch "(?i)^.*\.(jpg|jpeg|png)$">
ExpiresDefault "access plus 1 year"
</FilesMatch>
</IfModule>
But using this method image still remains the same even if user overwrites the file.