Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URI changes not purged #17

Open
timkelty opened this issue Sep 5, 2017 · 0 comments
Open

URI changes not purged #17

timkelty opened this issue Sep 5, 2017 · 0 comments

Comments

@timkelty
Copy link
Contributor

timkelty commented Sep 5, 2017

Since you're using elements.onSaveElement, the element's URI ends up being the newly saved one.

If the URI is being changed, the old one will remain varnished until manually cleared. I added the following to address:

            craft()->on('elements.onBeforeSaveElement', function (Event $event) {
                craft()->varnishpurge->purgeElement($event->params['element'], false);
            });
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

No branches or pull requests

1 participant