Add resource version to Store Replace params.

This commit is contained in:
Wojciech Tyczynski
2015-08-18 10:34:27 +02:00
parent 66a644b275
commit e202f9c797
20 changed files with 27 additions and 254 deletions

View File

@@ -166,7 +166,7 @@ func (c *ExpirationCache) Delete(obj interface{}) error {
// Replace will convert all items in the given list to TimestampedEntries
// before attempting the replace operation. The replace operation will
// delete the contents of the ExpirationCache `c`.
func (c *ExpirationCache) Replace(list []interface{}) error {
func (c *ExpirationCache) Replace(list []interface{}, resourceVersion string) error {
items := map[string]interface{}{}
ts := c.clock.Now()
for _, item := range list {
@@ -176,7 +176,7 @@ func (c *ExpirationCache) Replace(list []interface{}) error {
}
items[key] = &timestampedEntry{item, ts}
}
c.cacheStorage.Replace(items)
c.cacheStorage.Replace(items, resourceVersion)
return nil
}