Caching does not seem to work
-
Hi, I have the feeling that I found a bug: Caching breaks after one caching period has expired.
I wrote a simple endpoint that delivers some json. Currently, for testing purposes, it sends me an email whenever it gets called from wordpress. I set up JSON Content Importer to fetch data from my endpoint and display it somewhere on my site. I configured the JCI to cache it for 12 hours. This works well at first: The cache file below wp-content/cache/jsoncontentimporter/ gets created, and for the first 12 hours I see no further requests on my endpoint.
After those 12 hours being elapsed, I see a request for every visit of that page on my website. The cache file is still there, but its file date is more than 12h in the past.
So it seems to me, that JCI realizes the cache file is stale, re-fetches the content, but does forget to update the cache file, or touch the file date.If I use the settings page to delete my cache directory, the file gets deleted. On the next request JCI fetches my endpoint once, creates the cache file and the next 12 hours I see no requests as expected. After 12h, it begins to re-fetch with every page visit again.
So JCI does seem to have all necessary rights on that file (because it can delete it), but it does not delete/overwrite it after expiry.
Can you confirm this behavior?
Cheers, bhabtuoy
You must be logged in to reply to this topic.