aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/cache/common.go
Commit message (Collapse)AuthorAgeFilesLines
* Enforce the use of cache in packfile decoderJavi Fontan2017-12-201-0/+2
| | | | | | | | | | | | | | | | | Decoder object can make use of an object cache to speed up processing. Previously the only way to specify it was changing manually the struct generated by NewDecodeForFile. This lead to some instances to be created without it and penalized performance. Now the cache should be explicitly passed to the constructor function. NewDecoder now creates objects with a cache using the default size. A new helper function was added to create cache objects with the default size as this becomes a common task now: cache.NewObjectLRUDefault() Signed-off-by: Javi Fontan <jfontan@gmail.com>
* plumbing/cache: use more explicit interfaceSantiago M. Mola2017-07-271-2/+8
| | | | | | * 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-1/+3
|
* cache: move package to plumbingAntonio Jesus Navarro Perez2017-02-211-0/+16
Because cache package is only intended to be used at internal level, we move it to the plumbing package.