<< Back to previous view

[CCACHE-21] LRU and LU caches never evict entries that came in as a seed and are never accessed Created: 14/Mar/12  Updated: 14/Mar/12  Resolved: 14/Mar/12

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

Type: Defect Priority: Major
Reporter: Fogus Assignee: Fogus
Resolution: Completed Votes: 0
Labels: bug, cache, lru, lu


 Description   

If one initializes an LRU or LU cache with seed data and those datum are never touched, then they are never evicted.

  (def C (lru-cache-factory {:a 1, :b 2} :limit 2))
  
  (-> C (assoc :c 3) (assoc :d 4) (assoc :e 5))

You would expect that the cache should contain only :d and :e, but it instead includes :a, :b, :d and :e! The problem is that seeds are never added to the eviction queue.



 Comments   
Comment by Fogus [ 14/Mar/12 8:15 AM ]

Fixed in 5751b7e8d8d2f10c87b8a79c8ed9b0324368514d





[CCACHE-19] Create 3-arg version of lookup Created: 04/Jan/12  Updated: 05/Jan/12  Resolved: 05/Jan/12

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

Type: Task Priority: Major
Reporter: Fogus Assignee: Fogus
Resolution: Completed Votes: 0
Labels: cache, lookup

Approval: Ok

 Description   

Currently, lookup comes in only the 2-arg flavor (i.e. gimme a key and I'll give you a value or nil). The issue with this is that nil is potentially a legal value. Therefore, the 3-arg version logic is the same as the 3-arg `assoc` (.lookup this key not-found).

This change should propagate to all of the existing cache impls.



 Comments   
Comment by Fogus [ 05/Jan/12 7:36 AM ]

Added in f4450a039ef703ce62c61dd497aafed73194f1c2





[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


 Description   

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.



 Comments   
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.





[CCACHE-16] Benchmark v0.5.x against Google Guava Created: 16/Dec/11  Updated: 16/Dec/11

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

Type: Task Priority: Major
Reporter: Fogus Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: benchmark, cache, guava


 Description   

Perform some tests and benchmarks of core.cache and Google Guava's com.google.common.cache library.






[CCACHE-11] Add eviction implementation to LIRSCache Created: 08/Dec/11  Updated: 08/Dec/11

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

Type: Task Priority: Major
Reporter: Fogus Assignee: Fogus
Resolution: Unresolved Votes: 0
Labels: associative, cache, evict, lirs


 Description   

The evict method in the ProtocolCache needs implementation for LIRSCache. I will start initially with a single key eviction method to start. The evict method would form the basis for the associative dissoc which in turn forms the basis for proper limited seeding. LIRS poses an additional complication due to its dual limit lists. Currently only the BasicCache impl has evict.






[CCACHE-10] Add eviction implementation to LUCache Created: 08/Dec/11  Updated: 12/Dec/11  Resolved: 12/Dec/11

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

Type: Task Priority: Major
Reporter: Fogus Assignee: Fogus
Resolution: Completed Votes: 0
Labels: associative, cache, evict, lu


 Description   

The evict method in the ProtocolCache needs implementation for LUCache. I will start initially with a single key eviction method to start. The evict method would form the basis for the associative dissoc which in turn forms the basis for proper limited seeding. Currently only the BasicCache impl has evict.



 Comments   
Comment by Fogus [ 12/Dec/11 7:54 AM ]

Implemented in ca4587bdbdca2728b191bf98472a778231250e61.





[CCACHE-8] Add eviction implementation to LRUCache Created: 08/Dec/11  Updated: 09/Dec/11  Resolved: 09/Dec/11

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

Type: Task Priority: Major
Reporter: Fogus Assignee: Fogus
Resolution: Completed Votes: 0
Labels: associative, cache, evict, lru


 Description   

The evict method in the ProtocolCache needs implementation for LRUCache. I will start initially with a single key eviction method to start. The evict method would form the basis for the associative dissoc which in turn forms the basis for proper limited seeding. Currently only the BasicCache impl has evict.



 Comments   
Comment by Fogus [ 09/Dec/11 9:11 PM ]

Added in 77174780ac030ca3e72d51cae4dfb3eb2ac286ee.





[CCACHE-7] Add eviction implementation to FIFOCache Created: 08/Dec/11  Updated: 09/Dec/11  Resolved: 09/Dec/11

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

Type: Task Priority: Major
Reporter: Fogus Assignee: Fogus
Resolution: Completed Votes: 0
Labels: associative, cache, evict, fifo


 Description   

The evict method in the ProtocolCache needs implementation for FIFOCache. I will start initially with a single key eviction method to start. The evict method would form the basis for the associative dissoc which in turn forms the basis for proper limited seeding. Currently only the BasicCache impl has evict.



 Comments   
Comment by Fogus [ 09/Dec/11 8:52 AM ]

Added in 094363f48dbd5d4399d5e7df2b3fe995cdaf1737.





[CCACHE-4] Added LIRS factory fn Created: 06/Dec/11  Updated: 08/Dec/11  Resolved: 08/Dec/11

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

Type: Task Priority: Major
Reporter: Fogus Assignee: Fogus
Resolution: Completed Votes: 0
Labels: cache, enhancement


 Description   

LIRS is implemented as a type only ATM. There should also be a corresponding factory fn.



 Comments   
Comment by Fogus [ 08/Dec/11 12:11 PM ]

Completed in f4d1bf9f1069ba875a7a6a8a65646b35c6fbfd8f





[CCACHE-3] Add LIRS support. Created: 04/Dec/11  Updated: 06/Dec/11  Resolved: 06/Dec/11

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

Type: Task Priority: Major
Reporter: Fogus Assignee: Fogus
Resolution: Completed Votes: 0
Labels: cache, lirs


 Description   

Clache had an implementation of the LIRS http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.116.2184 strategy. This capability should be merged into core.cache also.



 Comments   
Comment by Fogus [ 06/Dec/11 8:40 AM ]

Added LIRS stock from Clache in f71d276695adc5c3af77799201140ea840cd5f79.





Generated at Mon Nov 24 09:29:09 CST 2014 using JIRA 4.4#649-r158309.