Potenial fix for 'marshal data too short' error - Ref #685

This commit is contained in:
erwanlr
2014-09-11 20:04:24 +02:00
parent f89463c4d8
commit a6b0548426
2 changed files with 22 additions and 8 deletions

View File

@@ -35,11 +35,9 @@ class CacheFileStore
end
def read_entry(key)
entry_file_path = get_entry_file_path(key)
if File.exists?(entry_file_path)
return @serializer.load(File.read(entry_file_path))
end
@serializer.load(File.read(get_entry_file_path(key)))
rescue
nil
end
def write_entry(key, data_to_store, cache_ttl)