Commit graph

24 commits

Author SHA1 Message Date
Karl Seguin 1189f7f993 make Clear thread-safe 2020-08-16 21:12:47 +08:00
Karl Seguin 0dbf3f125f add TrackingSet to LayeredCache 2020-08-14 11:15:13 +08:00
Bjørn Erik Pedersen 992cd9564b
Document DeleteFunc 2020-08-13 09:05:27 +02:00
Jonathon Lacher 4c88bf60e6
fix spelling in readme 2020-07-16 15:15:43 -05:00
Karl Seguin eab9dbaa7f update readme to /v2 2020-06-29 20:50:55 +08:00
Karl Seguin d9aec58960 add GetDropped documentation 2020-02-16 11:54:07 +08:00
Karl Seguin 79f9dcde21 fewer defers, document DeletePrefix 2020-01-23 12:55:55 +08:00
Karl Seguin 2ff889bcae document Clear 2020-01-23 10:04:47 +08:00
Karl Seguin 46ec5d2257 explicitly state the thread-safety nature of the library 2020-01-23 09:38:19 +08:00
Karl Seguin 692cd618b2 guard access to item.promotions in LayeredCache, which was applied to Cache in 557d56ec6f 2018-12-27 22:54:50 +07:00
spicydog 77679ba342 Fix an error in example "itemsToPrune"
itemsToPrune -> ItemsToPrune
2016-12-21 20:07:16 +10:00
Jens Deppe c1634a4d00 Add concept of a SecondaryCache which exposes the secondary part of a LayeredCache 2016-11-01 09:01:39 -07:00
Karl Seguin bfa769c6b6 add Stop method to stop the background worker and make it possible for the GC to reap the object 2015-07-23 22:24:50 +08:00
Karl Seguin c75dcd4c12 link to rcache 2014-12-06 17:19:23 +07:00
Karl Seguin 41ccfbb39a renamed MaxItems to MaxSize, updated readme 2014-11-21 15:06:27 +07:00
Karl Seguin cc0395a391 added replace method 2014-11-13 22:20:12 +07:00
Karl Seguin 7e08960075 update readme 2014-11-04 17:24:07 +07:00
Karl Seguin 5e131cc17c Buckets must be a power of 2. Move from % to & for determining the bucket. 2014-11-02 18:09:49 +07:00
Karl Seguin 0fddc964ec added extend 2014-10-27 08:27:26 +07:00
Karl Seguin 77765a3f11 Get now returns the *Item rather than the item's value. Get no longer actively
purges stale items.

Combining these two changes, CCache can now be used to implement both of
Varnish's grace and saint mode.
2014-10-25 17:15:47 +07:00
Karl Seguin 0c7492b382 Added layered cache 2014-10-25 12:19:14 +07:00
Karl Seguin a81a0f665c Changed some config defaults.
Added documentation
2014-10-14 13:43:34 +07:00
Karl Seguin 751266c34a Remove Value interface, cache now works against interface{} with the
expiry specified on a Set.

Get no longer returns expired items

Items can now be deleted
2013-10-30 20:18:51 +08:00
Karl Seguin 97bc65dc6a first commit 2013-10-19 08:56:28 +08:00