Restructure omni services and add Chatwoot research snapshot
This commit is contained in:
15
research/chatwoot/app/helpers/cache_keys_helper.rb
Normal file
15
research/chatwoot/app/helpers/cache_keys_helper.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
module CacheKeysHelper
|
||||
def get_prefixed_cache_key(account_id, key)
|
||||
"idb-cache-key-account-#{account_id}-#{key}"
|
||||
end
|
||||
|
||||
def fetch_value_for_key(account_id, key)
|
||||
prefixed_cache_key = get_prefixed_cache_key(account_id, key)
|
||||
value_from_cache = Redis::Alfred.get(prefixed_cache_key)
|
||||
|
||||
return value_from_cache if value_from_cache.present?
|
||||
|
||||
# zero epoch time: 1970-01-01 00:00:00 UTC
|
||||
'0000000000'
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user