1 // Package cache defines the interface for a key-based data store. 2 // 3 // This package is designated as private and is intended for use only by the 4 // smithy client runtime. The exported API therein is not considered stable and 5 // is subject to breaking changes without notice. 6 package cache 7 8 // Cache defines the interface for an opaquely-typed, key-based data store. 9 // 10 // The thread-safety of this interface is undefined and is dictated by 11 // implementations. 12 type Cache interface { 13 // Retrieve the value associated with the given key. The returned boolean 14 // indicates whether the cache held a value for the given key. 15 Get(k interface{}) (interface{}, bool) 16 17 // Store a value under the given key. 18 Put(k interface{}, v interface{}) 19 } 20