DEV: Use the theme cache helper for settings

The previous Discourse.cache usage was different to how other theme-related caching is handled, and also requires reaching out to redis every time. The common theme cache is held in memory (as a DistributedCache)
This commit is contained in:
David Taylor
2022-02-18 22:30:20 +00:00
parent 8e86d8a5dd
commit 51afa579f7
4 changed files with 3 additions and 14 deletions

View File

@@ -512,7 +512,7 @@ HTML
theme.save!
Upload.find(upload.id).destroy
theme.clear_cached_settings!
theme.remove_from_cache!
json = JSON.parse(cached_settings(theme.id))
expect(json).to be_empty