Skip to content

Conversation

@mindeffects
Copy link

Updating an image by just "overwriting" it had no effect because the phpThumbOf cache does not care about the date, only about the filename. With this little modification an image can easily be updated by overwriting it without any need to check on all the places this image was used (and refresh the cache for those).
This code was originally written by Mark Horstmann (Thanks to @itWilllBeOk) for an older version of phpThumbOf but still should work:
// mod: add mtime to cachename
$this->cacheFilename .= '.'.filemtime(rtrim($this->modx->getOption('base_path',null,MODX_BASE_PATH),'/').$this->input);

cheers
Oliver

Updating an image by just "overwriting" it had no effect because the phpThumbOf cache does not care about the date, only about the filename. With this little modification an image can easily be updated by overwriting it without any need to check on all the places this image was used (and refresh the cache for those).
@hansek
Copy link

hansek commented Nov 19, 2012

It looks helpful.

IMO, maybe this could have some performance "issues" (increase of processing time) after transferring cache to another platform during deployment etc.

@jpdevries
Copy link
Contributor

would a system setting to enable or disable the 'cachebusting' make it the best of both worlds?

@hansek
Copy link

hansek commented Oct 2, 2013

Creation of new system settings for this feature sounds good for me!

@jpdevries
Copy link
Contributor

Will keep an eye out for an update to the pull request 😉

@mindeffects
Copy link
Author

Thanks! A system setting is ALLWAYS nice to have! Gives the user sweat freedom of choice. ;-)

Cheers

Oliver

mindeffects
creations for media.print.online

adr mindeffects e.K. · aachener str. 628 · 50226 frechen · germany
fon +49-221-925533-5 · fax +49-221-925533-7
eml info@mindeffects.de · web http://www.mindeffects.de
hrg Gerichtsstand Köln HR A 14875 · ust-id DE186270670
agb allgemeine geschäftsbedingungen

Am 02.10.2013 um 07:50 schrieb JP DeVries notifications@github.com:

would a system setting to enable or disable the 'cachebusting' make it the best of both worlds?


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants