cache.go 741 B

12345678910111213141516171819
  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. // Cache defines the interface for an opaquely-typed, key-based data store.
  8. //
  9. // The thread-safety of this interface is undefined and is dictated by
  10. // implementations.
  11. type Cache interface {
  12. // Retrieve the value associated with the given key. The returned boolean
  13. // indicates whether the cache held a value for the given key.
  14. Get(k interface{}) (interface{}, bool)
  15. // Store a value under the given key.
  16. Put(k interface{}, v interface{})
  17. }