Clear Onebox Cache

In the redis cli, you can also delete individual keys without flushing the entire redis cache:

# ./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)

I expect that this key schema is unlikely to change often, but if it does, you can just use keys *onebox*url* or even keys *url* to look for the cached key to delete…

I can confirm that I successfully deleted cached oneboxes and rebuilt HTML for posts affected by cached broken data using this method.

8 Likes