I have followed same steps but in my case generatePerson method is called again and again. Result is not getting stored in cache probably. Even there is no error in console. Why? What are the possibilities for where I am doing wrong?
Good bro. In the Realtime, data in the cache and its expire time is 24 hours. Meanwhile value got changed for same key or same input. Then what will happen. ?
Since the data is cached for 24 hours, the value will remain as is. It wont update it untill the ttl expires. Once the ttl expires then it will allow the function call to proceed thereby updating the cache with a new value.
You should probably explicitly mention that the eviction annotation will not work unless in another class than the cacheable annotation. At least that is what I found.