Documentation ¶
Index ¶
- type Cache
- func (c *Cache) Add(ctx context.Context, chainReferenceID string, smartContractID uint64, ...)
- func (c *Cache) Delete(ctx context.Context, chainReferenceID string, msgIDs ...uint64)
- func (c *Cache) Get(ctx context.Context, chainReferenceID string, msgID uint64) uint64
- func (c *Cache) Has(ctx context.Context, chainReferenceID string, msgID uint64) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is meant as an asynchronous KV memcache to reduce constant keeper queries. It is NOT threadsafe, it requires manual bootstrapping by loading data from the keeper once during initialisation and needs to be kept in sync with added and removed keeper data manually.
If this works well, I'd like to build this into a v2 that functions basically like a keeper wrapper, agnostic of the underlaying data and keeping in sync with added and removed items automatically.
Click to show internal directories.
Click to hide internal directories.