Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddUpdCacheEntry ¶
AddUpdCacheEntry adds or updates a cache entry using the value of interface i and the string key. It is the callers responsbility to manage the key structure. For a struct type of Foo[], the function should be called as follows:
f := Foo{F1: "value1", F2: "value2",} k := "myUniqueKey1234" err := AddUpdCacheEntry(k,f)
func GetCacheEntry ¶
GetCacheEntry reads the specified entry from the cache. If the entry does not exist, an error will be set. For a struct type of Foo{}, the function should be called as follows:
f := &Foo{} k := "myUniqueKey1234" err := GetCacheEntry(k, f)
followng the call, f will contain the cached value of the Foo{} type if the read was successful.
func RemoveCacheEntry ¶
RemoveCacheEntry removes the specified entry from the cache if it exists. If the specified entry does not exist, no error is returned, as the cache is deemd to be in the correct state. An error will be returned only if the function was not able to complete the operation from a technical standpoint.
Types ¶
This section is empty.