1 # This Python file uses the following encoding: utf-8
10 def is_cached(dir, name
, component
):
11 return os
.path
.exists(os
.path
.join(dir, name
, component
))
13 def get_cache(dir, name
, component
):
14 return yaml
.load(os
.path
.join(dir, name
, component
))
16 def set_cache(dir, name
, component
, object):
17 if not os
.path
.exists(os
.path
.join(dir, name
)):
18 os
.mkdir(os
.path
.join(dir, name
))
19 yaml
.dump(object, open(os
.path
.join(dir, name
, component
), 'w'))