sm
/
cache
1
0
Fork 0

Commit Graph

  • 31c7be0bed 'Inline' Get and Expired Patrick Mylund Nielsen 2015-11-30 13:50:17 -0500
  • 4e0d34ef00 Only get the current time once in the DeleteExpired loop Patrick Mylund Nielsen 2015-11-30 13:39:27 -0500
  • a45ed98559 Add 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
  • c11107bf02 introduction of bst Giuseppe 2015-11-30 09:06:51 +0100
  • 28ab885a1a Make BenchmarkDeleteExpired more meaningful Patrick Mylund Nielsen 2015-11-28 15:13:26 -0500
  • cf4e165754 Add IncrementInt benchmark Patrick Mylund Nielsen 2015-11-28 14:56:23 -0500
  • 901b2413ee Improve cache locality by removing Item-related pointers Patrick Mylund Nielsen 2015-11-28 14:47:46 -0500
  • 3d4d09ca0b Add a benchmark for DeleteExpired() Patrick Mylund Nielsen 2015-11-28 14:35:38 -0500
  • 0ba3e0049c Update copyright years Patrick Mylund Nielsen 2015-11-28 14:21:44 -0500
  • ac0fcef49b Clarify that the OnEvicted function isn't called when an item is overwritten Patrick Mylund Nielsen 2015-11-28 12:27:08 -0500
  • e9441b12e0 Add mutex-using test condition to TestOnEvicted Patrick Mylund Nielsen 2015-11-28 12:22:52 -0500
  • 3f2c810ea1 Add OnEvicted() Patrick Mylund Nielsen 2015-11-27 22:00:08 -0500
  • a0136a8980 Don't expose the cache mutex Patrick Mylund Nielsen 2015-11-27 13:03:24 -0500
  • a122e14c4b Merge pull request #23 from databus23/patch-1 Patrick Mylund Nielsen 2015-10-13 08:21:26 -0400
  • fe045e4040 Fix leaking the janitor ticker when shutting down #23 Fabian Ruff 2015-10-13 12:55:54 +0200
  • 56403766d8 add Expire ExpireAt command #20 zhuangzebo 2015-04-14 17:28:35 +0800
  • 378662d53f Readme update Matt Keller 2015-03-09 08:23:46 -0400
  • d600e983c2 For 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
  • 2056c799e1 Comment correction Matt Keller 2015-03-08 12:39:08 -0400
  • bf414c412e Performance 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
  • b60c6ee2c8 Consistency. Matt Keller 2015-03-06 08:14:50 -0500
  • 93d85800f2 README.md: Add missing 'time' import to example v1.0.0 Patrick Mylund Nielsen 2015-03-03 09:09:38 -0500
  • f66ee0bbc6 Injected 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
  • 03284ca422 Replace sharded hash function/misc mods Patrick Mylund Nielsen 2014-12-22 10:37:59 -0500
  • 8a2f4f19ef go fmt Patrick Mylund Nielsen 2014-12-22 02:48:52 -0500
  • e3a846e1f9 Clarify what NoExpiration and DefaultExpiration are Patrick Mylund Nielsen 2014-12-22 02:47:08 -0500
  • a1dd6b7fff s/NewFrom/NewFrom()/ in NewFrom doc Patrick Mylund Nielsen 2014-12-22 02:39:59 -0500
  • 9ea75a8586 s/NewFrom/NewFrom()/ in Load/LoadFile/Save/SaveFile docs Patrick Mylund Nielsen 2014-12-22 02:37:46 -0500
  • 873e78f0db s/gob.Register/gob.Register()/ in NewFrom doc Patrick Mylund Nielsen 2014-12-22 02:30:02 -0500
  • bc36de7dec Clarify NewFrom documentation on use cases Patrick Mylund Nielsen 2014-12-22 02:15:12 -0500
  • d68800e607 s/with the same caveats/subject to the same caveat/ in NewFrom doc Patrick Mylund Nielsen 2014-12-22 02:09:42 -0500
  • 887753fa90 Refer to DeleteExpired as c.DeleteExpired() Patrick Mylund Nielsen 2014-12-22 02:06:10 -0500
  • 888f396121 Update NewFrom doc to be consistent with New Patrick Mylund Nielsen 2014-12-22 02:04:11 -0500
  • 32dd451b6d README.md: Be consistent with NewFrom() Patrick Mylund Nielsen 2014-12-22 01:59:29 -0500
  • 238c0209c0 New markdown README (thanks Jason Mooberry) Patrick Mylund Nielsen 2014-12-22 01:55:57 -0500
  • 46827c6a61 Add NoExpiration and DefaultExpiration constants and use them (thanks to Jason Mooberry) Patrick Mylund Nielsen 2014-12-22 01:46:22 -0500
  • 73a30b2033 Add NewFrom, and deprecate Save, SaveFile, Load, and LoadFile Patrick Mylund Nielsen 2014-12-22 01:12:10 -0500
  • ffd0b9e3ec Move the unexportedShardedCache to sharded.go Patrick Mylund Nielsen 2014-12-22 00:24:49 -0500
  • 6ea7e6fb42 Remove the pointless unexportedInterface Patrick Mylund Nielsen 2014-12-22 00:12:48 -0500
  • 23b49bf74d LICENSE: Remove sneaky space character Patrick Mylund Nielsen 2014-12-22 00:01:09 -0500
  • 61ce35d44e LICENSE: Update copyright to 2012-2014 Patrick Mylund Nielsen 2014-12-21 23:56:20 -0500
  • 8c0eccfc44 CONTRIBUTORS: Add Jason Mooberry Patrick Mylund Nielsen 2014-12-21 23:51:48 -0500
  • 0386c8ca8d Merge abe7c4fb56 into 7d1d6d6ae9 #16 Diogo Franco 2014-12-11 08:42:07 +0000
  • abe7c4fb56 Do not register types with encoding/gob #16 Diogo Franco (Kovensky) 2014-12-11 17:21:32 +0900
  • a90c8f0c44 Merge df8252be86 into 7d1d6d6ae9 #15 Jason Mooberry 2014-11-10 20:52:28 +0000
  • df8252be86 Updating readme with expiration constants #15 Jason Mooberry 2014-11-10 15:52:23 -0500
  • e8abf5f90b Updating tests to use constants Jason Mooberry 2014-11-10 15:24:55 -0500
  • 4d8bcdeb84 Adding meaningful constant expirations Jason Mooberry 2014-11-10 15:24:35 -0500
  • 83173d0cbb Merge 8b40db4bcb into 7d1d6d6ae9 #13 Ivan 2014-06-27 15:17:32 +0000
  • 8b40db4bcb fix bug #13 t0pep0 2014-06-27 19:14:12 +0400
  • e6fc830fe3 Update CONTRIBUTORS Ivan 2014-06-27 16:39:52 +0400
  • 673ec5bc75 change map to binary tree t0pep0 2014-06-27 16:38:16 +0400
  • 7d1d6d6ae9 Note 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
  • 3ff6a5407e Reference 'go doc' in the README Patrick Mylund Nielsen 2013-08-08 15:02:23 -0400
  • c383ebd2ba Remove 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
  • e91e36d111 ItemCount() is equivalent to len(c.Items()), not len(c.Items) Patrick Mylund Nielsen 2013-08-08 14:54:03 -0400
  • fd89281dfd s/field/fields/ Patrick Mylund Nielsen 2013-08-08 14:53:24 -0400
  • f8cc27acbc Export Item wrapping type, and add an Items() method to cache Patrick Mylund Nielsen 2013-08-08 14:53:02 -0400
  • baa5a64da4 Revert 3986bff for now Patrick Mylund Nielsen 2013-06-30 22:05:40 -0400
  • e833a42165 Merge fbf4553159 into 2fb27e8369 #11 inconshreveable 2013-06-30 18:22:45 -0700
  • fbf4553159 Fix race condition writing items out in Save() by copying the cached items map #11 Alan Shreve 2013-06-30 18:16:16 -0700
  • 2fb27e8369 Change 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
  • 155ab21e5d Use an RWMutex in the cache-equivalent map tests now that the cache uses one Patrick Mylund Nielsen 2013-06-30 20:31:46 -0400
  • 85f71a908c Merge 1420786345 into 3986bff69b #8 Matthew Kanwisher 2013-06-30 17:25:59 -0700
  • 3986bff69b Don'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
  • 5388b25b3b Use 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
  • 662719124c Merge 66d0db0f9a into 1fc39f1402 #10 inconshreveable 2013-06-30 16:19:42 -0700
  • 66d0db0f9a Make Save/Load thread-safe #10 Alan Shreve 2013-06-30 16:12:31 -0700
  • 1420786345 use multi reader locks #8 Matthew Kanwisher 2013-05-16 17:38:53 -0400
  • 1fc39f1402 Add ItemCount method description to README reference Patrick Mylund Nielsen 2013-04-18 15:26:16 -0400
  • 1140511315 Condense 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
  • 739fb494dc Update LICENSE file to 2012-2013 Patrick Mylund Nielsen 2013-04-18 14:35:10 -0400
  • c9f5754801 Add 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
  • d5d03c28d4 Add specialized increment and decrement methods Patrick Mylund Nielsen 2013-04-18 14:24:30 -0400
  • b5601e904d Clarify licensing on contributed code Patrick Mylund Nielsen 2012-10-08 12:34:42 +0200
  • 525c0ccc26 Add CONTRIBUTORS file and 'and the go-cache contributors' bit to the copyright line in LICENSE Patrick Mylund Nielsen 2012-10-08 12:31:23 +0200
  • e30c8eff7a Merge pull request #4 from temoto/patch-1 Patrick Mylund Nielsen 2012-10-08 03:27:04 -0700
  • 34a5a0d7ab Merge a768a84319 into 72916cf4df #4 Sergey Shepelev 2012-09-18 16:25:51 -0700
  • a768a84319 Save/LoadFile must close file #4 Sergey Shepelev 2012-09-19 03:25:42 +0400
  • 72916cf4df Update README to reflect API change: IncrementFloat now only works on float32 and float64, and the use of Decrement should be encouraged over Increment (with a negative number) since Increment converting a negative signed integer to an unsigned integer probably isn't the intended behavior Patrick Mylund Nielsen 2012-08-17 13:48:55 +0200
  • b3a957a46c Handle float64 and int64 Increment/Decrement separately, and don't use Increment(-n) in Decrement to support uints Patrick Mylund Nielsen 2012-08-17 13:39:02 +0200
  • 9cc10f6f2f Use a type switch instead, and Use unexported NewSharded in test Patrick Mylund Nielsen 2012-08-17 11:35:20 +0200
  • 13225a8ae4 Unexport the shardedcache interface and implementation until both the API and implementation are solid Patrick Mylund Nielsen 2012-08-17 11:32:24 +0200
  • 15cda21ff4 Add an interface, embed the mutex, and unexport some unnecessarily exported fields Patrick Mylund Nielsen 2012-07-04 19:34:37 +0100
  • bf97a87cc7 Cleaner bucket selection Patrick Mylund Nielsen 2012-06-22 09:33:27 +0100
  • 52c269d8ae Testing a sharded cache. Could be useful for massively parallel applications Patrick Mylund Nielsen 2012-06-22 09:24:09 +0100
  • 0f0584a805 Fix BenchmarkCacheSetDeleteSingleLock 'cheating' by unintentionally only locking once in the whole benchmark, rather than once per set and delete Patrick Mylund Nielsen 2012-06-22 06:52:32 +0100
  • 0a962bf9eb Keep the same tense in docstrings, and remove a little ambiguity Patrick Mylund Nielsen 2012-06-22 04:24:48 +0100
  • 8f6294df58 Remove unused Version const Patrick Mylund Nielsen 2012-06-22 04:10:33 +0100
  • 2b93e5eceb Stay below 80 characters in width in the README as well Patrick Mylund Nielsen 2012-06-22 04:04:21 +0100
  • 026efae39f Stay below 80 chars in width Patrick Mylund Nielsen 2012-06-22 03:56:12 +0100
  • 724bd0e963 Move comment explaining the manual mutex unlocking down to the first place where we actually do it Patrick Mylund Nielsen 2012-06-22 03:51:34 +0100
  • aa7f52c169 Be clearer about the defaults, <80 width for the janitor comment, and remove 'default cleanup interval' -- there can be only one Patrick Mylund Nielsen 2012-06-22 03:50:10 +0100
  • 8495026156 c can be collected. It isn't necessarily (right after) Patrick Mylund Nielsen 2012-06-22 03:44:04 +0100
  • 23661b37bd Point out why using go-cache might be desirable Patrick Mylund Nielsen 2012-06-22 03:11:31 +0100
  • 803ceeaf1a Use runtime.numCPU() workers in concurrent benchmarks, remove pointless benchmarks for racy maps, and add replacement benchmarks using mutexed maps Patrick Mylund Nielsen 2012-06-22 03:06:06 +0100
  • 3bd539b94d Merge pull request #2 from dustin/master Patrick Mylund Nielsen 2012-06-21 18:50:17 -0700
  • b4621f5e6d Merge fbcdb10061 into 3c46230312 #2 GitHub Merge Button 2012-06-21 17:39:13 -0700
  • fbcdb10061 Don't overparallelize the concurrent test. #2 Dustin Sallings 2012-06-21 17:36:24 -0700
  • 3c46230312 use an integer example for the second to make it more obvious that the cache stores anything, not just strings Patrick Mylund Nielsen 2012-05-10 11:58:45 -0500