Mind Dump, Tech And Life Blog
written by Ivan Alenko
published under license Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)copy! share!
posted at 08. Aug '21

Howto Reset Lit Cache

How to reset cache in Lost in Translation gem - https://github.com/prograils/lit. Lit is not perfect and sometimes it is necessary. DANGER: Removes all translations added via web interface and loads them from YAML files again!

Lit.init.cache.reset
Lit::LocalizationKey.all.destroy_all
# Lit::LocalizationKey.where("localization_key LIKE 'active_admin%'").destroy_all <- remove only speficic translation keys
Lit.init.cache.reset

Restart the app.

Add Comment