Clear Onebox Cache


(Felix Freiberger) #1

I’m developing a small Onebox plugin and testing it in my production install.

It appears that Discourse is caching the Oneboxes: When I paste a link I once saw oneboxed into a new post, the preview is still looking as if it was generated by an older version of the plugin, while newer links appear as they should. All this is happening in the preview, I’m not actually posting the link.

How can I clear this cache?


Does Onebox engine cache content locally?
(Jeff Atwood) #2

Adding a rando querystring is usually the best quick & dirty way.


(Felix Freiberger) #3

Yes, that works – but only to circumvent the cache for testing, not to clear it for end users.

Is there a way to really purge this cache? Does it expire eventually?


(Régis Hanol) #4

There’s always the :bomb: option to redis-cli flushall.

Yup, it’ll automatically expire after 24 hours.


(Felix Freiberger) #5

Great – this helps a lot. Thanks!

:bomb: all the caches!


(Régis Hanol) #6

Be aware that flushing redis will clear sidekiq’s queue (and thus might end up losing some email notifications)