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.
En la CLI de Redis, también puedes eliminar claves individuales sin vaciar toda la caché de Redis:
# ./launcher enter app
# redis-cli
> keys *CACHE:onebox*example.com*
1) `"default: CACHE:onebox__https://example.com/"`
> del "default: CACHE:onebox__https://example.com/"
(integer) 1
> keys *CACHE:onebox*example.com*
(empty list or set)
Espero que este esquema de claves no cambie con frecuencia, pero si lo hace, simplemente puedes usar keys *onebox*url* o incluso keys *url* para buscar la clave en caché que deseas eliminar…
Puedo confirmar que eliminé correctamente oneboxes en caché y reconstruí el HTML de las publicaciones afectadas por datos corruptos en caché utilizando este método.