Complete the code to check if the data exists in the cache.
if cache.[1](key):
The exists method checks if the key exists in the cache.
Complete the code to retrieve data from the cache.
data = cache.[1](key)The get method retrieves the value for the given key from the cache.
Fix the error in the code to store data in the cache.
cache.[1](key, data, expiration=3600)
The set method stores data in the cache with an optional expiration time.
Fill both blanks to implement cache-aside pattern: fetch from cache or load from database.
if not cache.[1](key): data = database.[2](key) cache.set(key, data)
First, check if the key exists in cache with exists. If not, load data from database using load.
Fill all three blanks to complete cache-aside pattern with expiration time.
if not cache.[1](key): data = database.[2](key) cache.[3](key, data, expiration=300)
Check cache key existence with exists, load data from database with load, then store in cache with set including expiration.
