mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 15:16:19 +08:00
33a0ad1b69
Previously calls such as `Emoji["smile"]` would force a full dehydration of objects from Redis. This introduces a version safe site and global emoji cache so lookups are cheap. It eliminates iterating through the list of emojis and pulling from redis. Distributed cache uses a normalized name as the key and stores an Array tuple with version and Emoji. Successful hits always confirm version matches. Interface to Emoji object remains unchanged. We opted for 2 caches to improve reuse on multisites. misses though will be stored in both caches. If there is a hit on the global cache we can avoid looking up in site local cache and storing a miss there. |
||
---|---|---|
.. | ||
components | ||
fabricators | ||
fixtures | ||
helpers | ||
import_export | ||
initializers | ||
integration | ||
integrity | ||
jobs | ||
lib | ||
mailers | ||
models | ||
multisite | ||
requests | ||
script/import_scripts | ||
serializers | ||
services | ||
support | ||
tasks | ||
views/omniauth_callbacks | ||
rails_helper.rb | ||
regenerate_swagger_docs | ||
swagger_helper.rb |