Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encode ¶
Encode serializes a cache Entry (map[string]interface{}) into JSON bytes for storage. This function converts cache entries into a portable format that can be stored in various cache backends (Redis, Badger, etc.) and survives application restarts. Returns the JSON-encoded byte slice or an error if marshaling fails.
func UsesBadger ¶
func UsesBadger() bool
Checks if any framework service is configured to use Badger. Returns true if the CACHE environment variable
Types ¶
type Entry ¶
type Entry map[string]interface{}
func Decode ¶
Decode deserializes JSON bytes back into a cache Entry for use by the application. This function reconstructs cache entries from their stored JSON representation, allowing cached data to be retrieved and used regardless of the underlying storage backend. Returns the decoded Entry or an error if the data is not valid JSON or cannot be unmarshaled.