Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Does not purge image scales upon Editing due to patched ___<lang>___ URL scheme #8

Open
jnachtigall opened this issue Dec 27, 2013 · 1 comment

Comments

@jnachtigall
Copy link
Contributor

plone.app.caching purges ImageFields with https://github.com/plone/plone.app.caching/blob/master/plone/app/caching/purge.py#L179:

                if IImageField.providedBy(field):
                    for size in field.getAvailableSizes(self.context).keys():
                        yield "%s_%s" % (fieldURL, size,)

That is, when I have a news item with an image included and I change it, then all available scale sizes of this image are purged on the caching proxy (e.g. varnish). With raptus.multilanguagefields this does not work anymore, because the image scale is patched to be "image______scale". I think this is done in https://github.com/Raptus/raptus.multilanguagefields/blob/master/raptus/multilanguagefields/patches/imaging.py#L52

To fix one would just need to copy https://github.com/plone/plone.app.caching/blob/master/plone/app/caching/purge.py over to raptus.multilanguagefields and to register and adjust it accordingly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant