afadf13f9fBack to UnixNano(), syscall dependency isn't worth a few nanoseconds better performance
Patrick Mylund Nielsen
2015-11-30 15:12:19 -0500
f6cdd07cbbMerge branch 'timeval'
Patrick Mylund Nielsen
2015-11-30 15:02:11 -0500
2f0c74ebb8Use intermediary timevals
Patrick Mylund Nielsen
2015-11-30 15:02:02 -0500
2f60853f80No need for emptyTime anymore
Patrick Mylund Nielsen
2015-11-30 14:49:18 -0500
01842a547cUse timevals
Patrick Mylund Nielsen
2015-11-30 14:47:22 -0500
1924ec3bafRemove expired() since it's no longer used (because of the inlining)
Patrick Mylund Nielsen
2015-11-30 14:14:52 -0500
8084bd02b5Inline expiration checks manually for performance
Patrick Mylund Nielsen
2015-11-30 14:12:45 -0500
eb4f9f6b2fUse UnixNano int64s instead of Time
Patrick Mylund Nielsen
2015-11-30 13:54:01 -0500
31c7be0bed'Inline' Get and Expired
Patrick Mylund Nielsen
2015-11-30 13:50:17 -0500
4e0d34ef00Only get the current time once in the DeleteExpired loop
Patrick Mylund Nielsen
2015-11-30 13:39:27 -0500
a45ed98559Add benchmarks that use expiring items (time.Now calls) and rename BenchmarkDeleteExpired to BenchmarkDeleteExpiredLoop for clarity
Patrick Mylund Nielsen
2015-11-30 10:45:30 -0500
c11107bf02introduction of bst
Giuseppe
2015-11-30 09:06:51 +0100
28ab885a1aMake BenchmarkDeleteExpired more meaningful
Patrick Mylund Nielsen
2015-11-28 15:13:26 -0500
cf4e165754Add IncrementInt benchmark
Patrick Mylund Nielsen
2015-11-28 14:56:23 -0500
901b2413eeImprove cache locality by removing Item-related pointers
Patrick Mylund Nielsen
2015-11-28 14:47:46 -0500
3d4d09ca0bAdd a benchmark for DeleteExpired()
Patrick Mylund Nielsen
2015-11-28 14:35:38 -0500
0ba3e0049cUpdate copyright years
Patrick Mylund Nielsen
2015-11-28 14:21:44 -0500
ac0fcef49bClarify that the OnEvicted function isn't called when an item is overwritten
Patrick Mylund Nielsen
2015-11-28 12:27:08 -0500
e9441b12e0Add mutex-using test condition to TestOnEvicted
Patrick Mylund Nielsen
2015-11-28 12:22:52 -0500
3f2c810ea1Add OnEvicted()
Patrick Mylund Nielsen
2015-11-27 22:00:08 -0500
a0136a8980Don't expose the cache mutex
Patrick Mylund Nielsen
2015-11-27 13:03:24 -0500
a122e14c4bMerge pull request #23 from databus23/patch-1
Patrick Mylund Nielsen
2015-10-13 08:21:26 -0400
fe045e4040Fix leaking the janitor ticker when shutting down
Fabian Ruff
2015-10-13 12:55:54 +0200
378662d53fReadme update
Matt Keller
2015-03-09 08:23:46 -0400
d600e983c2For inclusion with upstream projection, Cache.New() has been reverted to its former argument list, and Cache.NewWithLRU() as been added to allow setting maxItems. cache_test has also been reverted.
Matt Keller
2015-03-09 08:17:46 -0400
2056c799e1Comment correction
Matt Keller
2015-03-08 12:39:08 -0400
bf414c412ePerformance was suffering with very large caches, when the cache was under maxItems pressure. Reverted the LRU handler back to the first iteration: lazy deletion via the janitor, with bulk removal.
Matt Keller
2015-03-08 11:50:57 -0400
b60c6ee2c8Consistency.
Matt Keller
2015-03-06 08:14:50 -0500
93d85800f2README.md: Add missing 'time' import to example
v1.0.0
Patrick Mylund Nielsen
2015-03-03 09:09:38 -0500
f66ee0bbc6Injected LRU capabilities that simply: * ensures that when an item is added, if the number of unexpired items >= maximum number of items specified, the oldest (based on ACCESS) is expired * when an item is "gotten", or "set", the access time is updated
Matt Keller
2015-02-27 15:57:16 -0500
e6fc830fe3Update CONTRIBUTORS
Ivan
2014-06-27 16:39:52 +0400
673ec5bc75change map to binary tree
t0pep0
2014-06-27 16:38:16 +0400
7d1d6d6ae9Note about needing explicit synchronization if you want to use the returned items map and its cache at the same time
Patrick Mylund Nielsen
2013-08-08 15:10:54 -0400
3ff6a5407eReference 'go doc' in the README
Patrick Mylund Nielsen
2013-08-08 15:02:23 -0400
c383ebd2baRemove go doc-style reference from README since go doc now shows public methods from (private) embedded structs
Patrick Mylund Nielsen
2013-08-08 15:01:48 -0400
e91e36d111ItemCount() is equivalent to len(c.Items()), not len(c.Items)
Patrick Mylund Nielsen
2013-08-08 14:54:03 -0400
fd89281dfds/field/fields/
Patrick Mylund Nielsen
2013-08-08 14:53:24 -0400
f8cc27acbcExport Item wrapping type, and add an Items() method to cache
Patrick Mylund Nielsen
2013-08-08 14:53:02 -0400
baa5a64da4Revert 3986bff for now
Patrick Mylund Nielsen
2013-06-30 22:05:40 -0400
fbf4553159Fix race condition writing items out in Save() by copying the cached items map
Alan Shreve
2013-06-30 18:16:16 -0700
2fb27e8369Change the names of the MutexMap benchmarks to RWMutex to clarify the changes to the map benchmarks and the cache itself
Patrick Mylund Nielsen
2013-06-30 20:40:26 -0400
155ab21e5dUse an RWMutex in the cache-equivalent map tests now that the cache uses one
Patrick Mylund Nielsen
2013-06-30 20:31:46 -0400
3986bff69bDon't keep the read lock after traversing the items map (before saving to the io.Writer) in Save
Patrick Mylund Nielsen
2013-06-30 20:20:38 -0400
5388b25b3bUse an RWMutex instead of a Mutex, making Get a read operation only (this slightly changes the eviction behavior: lookup doesn't completely expunge an expired item, but the janitor still will at the next cleanup.) Also, use the same RWMutex in Load and Save (thanks, Alan Shreve)
Patrick Mylund Nielsen
2013-06-30 20:11:57 -0400
66d0db0f9aMake Save/Load thread-safe
Alan Shreve
2013-06-30 16:12:31 -0700
1420786345use multi reader locks
Matthew Kanwisher
2013-05-16 17:38:53 -0400
1fc39f1402Add ItemCount method description to README reference
Patrick Mylund Nielsen
2013-04-18 15:26:16 -0400
1140511315Condense the reference in the README by removing the duplicate descriptions and providing one general one for all of them
Patrick Mylund Nielsen
2013-04-18 15:24:40 -0400
739fb494dcUpdate LICENSE file to 2012-2013
Patrick Mylund Nielsen
2013-04-18 14:35:10 -0400
c9f5754801Add O(1) ItemCount method to retrieve items currently in the cache map (whether expired and not cleaned up or not)
Patrick Mylund Nielsen
2013-04-18 14:32:01 -0400