I want to do an effective caching in JSON response of generic cache either in Memcache or Database Caching.
But I want to change the cache if an object is newly created(add the object name and id to JSON Response) and edit the object. As the TTL of cache is 1 day, so the cache will update in 1 day, but I wanted to modify the cache if an object is created, edited or deleted.
I am using this JSON response to search the objects via Jquery Autocomplete, but my total objects JSON size is over 1.2 MB, so it loads on every request, but I want to cache this to reduce server response time.
Help me, or correct me if I am doing wrong.