Allow custom cache objects using callback modules
This patch allows custom objects derived from design documents to be
exposed in the ddoc_cache. A custom object is defined by a module
exporting the recover/1 function which accepts the name of a database
and returns {ok, term()}. The term will be cached as if it were a design
doc. For the sake of simplicity all custom cache objects associated with
a database are evicted when any ddoc in the database changes.
Once a custom callback module has been defined the object associated
with the module can be retrieved via ddoc_cache:open(DbName, Mod).
BugzID: 42707
2 files changed
tree: b4a6a56327f01b6ba01ddff625c54143fc8c2401
- priv/
- src/
- README.md
README.md
Design Doc Cache
Pretty much covers it.