Cache fixed
This commit is contained in:
parent
763800a04f
commit
14abcfeb5b
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
class Cache
|
class LogAn::Cache
|
||||||
READ = 1
|
READ = 1
|
||||||
WRITE = 2
|
WRITE = 2
|
||||||
attr_reader :source, :data
|
attr_reader :source, :data
|
||||||
|
@ -37,12 +37,12 @@ class Cache
|
||||||
|
|
||||||
def read_cache= type
|
def read_cache= type
|
||||||
@type &= ~ (type ? 0 : 1)
|
@type &= ~ (type ? 0 : 1)
|
||||||
define_singleton_method :[], type ? :oget, :dget
|
define_singleton_method :[], type ? :oget : :dget
|
||||||
end
|
end
|
||||||
|
|
||||||
def write_cache= type
|
def write_cache= type
|
||||||
@type &= ~ (type ? 0 : 2)
|
@type &= ~ (type ? 0 : 2)
|
||||||
define_singleton_method :[], type ? :oset, :dset
|
define_singleton_method :[], type ? :oset : :dset
|
||||||
end
|
end
|
||||||
|
|
||||||
#include Enumerable
|
#include Enumerable
|
||||||
|
@ -54,7 +54,7 @@ class Cache
|
||||||
#end
|
#end
|
||||||
end
|
end
|
||||||
|
|
||||||
class AutoValueConvertHash
|
class LogAn::AutoValueConvertHash
|
||||||
include Enumerable
|
include Enumerable
|
||||||
|
|
||||||
def initialize obj, encode = nil, each = nil, &decode
|
def initialize obj, encode = nil, each = nil, &decode
|
||||||
|
|
Loading…
Reference in a new issue