comparison util/cache.lua @ 11200:bf8f2da84007

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 05 Nov 2020 22:31:25 +0100
parents c4c06fbb7d87
children 8ec7b7d6556f
comparison
equal deleted inserted replaced
11199:6c7c50a4de32 11200:bf8f2da84007
26 end 26 end
27 list._count = list._count + 1; 27 list._count = list._count + 1;
28 end 28 end
29 29
30 local cache_methods = {}; 30 local cache_methods = {};
31 local cache_mt = { __index = cache_methods }; 31 local cache_mt = { __name = "cache", __index = cache_methods };
32 32
33 function cache_methods:set(k, v) 33 function cache_methods:set(k, v)
34 local m = self._data[k]; 34 local m = self._data[k];
35 if m then 35 if m then
36 -- Key already exists 36 -- Key already exists