Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.
This repository was 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

@jnachtigall

Description

@jnachtigall

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions