Django - Caching
This Django code tries to cache a complex object but causes an error:
What is the likely cause of the error?
from django.core.cache import cache
class MyObject:
def __init__(self, value):
self.value = value
obj = MyObject(10)
cache.set('obj', obj, timeout=300)
What is the likely cause of the error?
