aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/cache/object_test.go
Commit message (Collapse)AuthorAgeFilesLines
* plumbing/cache: check for empty cache listJavi Fontan2019-02-251-1/+14
| | | | | | | | If there is wrong data in the cache it may cause the eviction code to empty the object list and cause a panic. This patch adds a check and sets the cache usage to 0 when this happens. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Fix potential LRU cache size issue.kuba--2018-09-171-0/+19
| | | | Signed-off-by: kuba-- <kuba@sourced.tech>
* Test eviction of more than one objectJavi Fontan2018-01-161-0/+20
| | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Exercise NewObjectLRUDefault in testingJavi Fontan2017-12-201-41/+60
| | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
* fix race condition on ObjectLRUMiguel Molina2017-08-111-0/+28
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* plumbing/cache: change FIFO to LRU cacheSantiago M. Mola2017-07-271-17/+9
|
* plumbing/cache: use more explicit interfaceSantiago M. Mola2017-07-271-11/+19
| | | | | | * renamed Add to Put * Get returns a second bool value to indicate if there was hit or miss.
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-071-1/+1
| | | | To be able to fix #261 we will move again to gopkg.in before v4 stable release.
* plumbing/cache: specify units in memory size (Fix #234)Antonio Jesus Navarro Perez2017-02-271-9/+12
|
* cache: move package to plumbingAntonio Jesus Navarro Perez2017-02-211-0/+85
Because cache package is only intended to be used at internal level, we move it to the plumbing package.