code.framework.cache
fetch
added in 3.0
(fetch ns file-path)(fetch ns file-path current cache-dir)reads a the file or gets it from cache
(fetch ’code.manage “src/code/manage.clj”) => (any map? nil?)
file-modified?
added in 3.0
(file-modified? ns file-path)(file-modified? ns file-path current cache-dir)checks if code file has been modified from the cache
(file-modified? ’code.manage “src/code/manage.clj”) => boolean?
init-memory!
added in 3.0
(init-memory!)(init-memory! current cache-dir)initialises memory with cache files
prepare-in
added in 3.0
(prepare-in data)prepares input string to code blocks
(-> (prepare-in ’{ns {var {:test {:code “(+ 1 2 3)”}}}}) (get-in ’ns var :test :code) (first) (block/value)) => ’(+ 1 2 3)
prepare-out
added in 3.0
(prepare-out data)prepares code block for output
(prepare-out {’ns {’var {:test {:code (block/block ’(1 2 3))}}}}) => ’{ns {var {:test {:code “(1 2 3)”}}}}
update
added in 3.0
(update ns file-path data)(update ns file-path data current cache-dir cache-suffix)updates values to the cache