When I was around project goggles in golang, since I used nodeJs in my documentation site and cached all the articles on any write change, I knew NODEJS is single-threaded, so no timer expiration strategy to the cached items, they get refreshed whenever I make a write operation to any of the markdown files, I wanted to implement a go cache, then the design theory is the Janitor strategy and read-write lock.
The cache store should be a live object store instance that when wanting to write an object to it, Write lock is applied, and no reading is allowed, and all the same, when reading or getting an object from the store, writing is not allowed and there is a watchdog thread that loops once in a while like 5 minutes, and remove all expired cache items, so the store get refreshed and space get recycled.