mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FIX: support Arrays with Marshal dump in distributed cache
Theme cache uses arrays here
This commit is contained in:
parent
17047806b9
commit
a35f2984e9
2 changed files with 15 additions and 1 deletions
|
@ -74,7 +74,7 @@ class DistributedCache
|
|||
|
||||
def set(hash, key, value)
|
||||
# special support for set
|
||||
marshal = (Set === value || Hash === value)
|
||||
marshal = (Set === value || Hash === value || Array === value)
|
||||
value = Base64.encode64(Marshal.dump(value)) if marshal
|
||||
publish(hash, op: :set, key: key, value: value, marshalled: marshal)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue