<< Back to previous view

[CCACHE-17] Create function backed cache Created: 16/Dec/11  Updated: 19/Dec/11

Status: Open
Project: core.cache
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: Fogus Assignee: Fogus
Resolution: Unresolved Votes: 0
Labels: cache, fn-cache, new-feature


A cache implementation that is backed by a function that performs some action on a cache miss could serve as a front for any of the existing cache impls.

Comment by Rich Hickey [ 16/Dec/11 9:45 AM ]

It doesn't perform an action per se, it gets a passed key and returns a value, which the cache then caches (associates with the key) and returns. The tricky bit is when the function can't get a value. There needs to be some protocol for communicating that (could be like 3 arg get), and, should the cache be asked again later for the same key, calling the fn again.

Comment by Fogus [ 19/Dec/11 7:29 AM ]

Thanks for the feedback Rich. I believe I understand the subtleties now.

Generated at Thu Jan 18 00:33:57 CST 2018 using JIRA 4.4#649-r158309.