March 2019
Intermediate to advanced
336 pages
9h 9m
English
The Cache class consists of objects map with a string key, a CacheObject value, and a sync.RWMutex mutex. This is shown in the following code:
//Cache classtype Cache struct { objects map[string]CacheObject mutex *sync.RWMutex}
The NewCache, GetObject, and SetValue methods of the Cache class are shown in the following sections.
Read now
Unlock full access