Guest Entry submission doesn't seem to trigger a cache invalidation?
devinellis opened this issue · 1 comments
My observation has been that submitting an anonymous entry using this plugin does not trigger a cache invalidation. So when the page reloads, the user's content is not visible yet. However, if I reload a CP URL, that seems to trigger the cache invalidation.
My workaround was to use the Cache Clear plugin, but it's kind of a blunt instrument, I'd rather have the appropriate cache keys cleared when the user submits their entry data.
If this can't be added to the roadmap, it might be worth pointing out in the readme?
Thanks!
I assume by “cache invalidation” you mean the “Delete stale template caches” background job. Craft only runs the queue when accessing the control panel, but you can fix that by disabling runQueueAutomatically and setting up your own queue worker that is either constantly listening for new jobs, or blindly running the queue once every minute, etc. See nystudio107’s Robust queue job handling in Craft CMS article for more info.