Plugin Author
Ajay
(@ajay)
- Yes it should work even if you are an admin. My suggestion on caching is to enable the second one only which is related to the HTML code. Over time, I’m going to remove the first option as it was the middle ground when I cached the HTML differently.
- I have only recently started using redis myself, but I don’t know yet how I could take advantage of it. I think the wp_cache_set functions implement it but it isn’t fit for purpose for what CRP does so I’m thinking of borrowing that code which should hopefully help with that. To be transparent, it might only be in the pro version – but I haven’t decided yet.
To check the first, my suggestion would be to run Query Monitor and check the queries generated – with the HTML cache enabled, the first load will be heavy, but the subsequent ones should be very quick. The cache is also a long one – weekly – so even highly updated sites shouldn’t be an issue.
Thread Starter
Anonymous User 6087458
(@anonymized-6087458)
Hi @ajay thanks for your reply really appreciated.
I have the 2nd cache option enabled on my local dev setup but see no difference in number of queries run/speed difference having enabled it and looking in query monitor.
Where is the cache actually created on the file system out of interest? I also see no files being created when I try a git submit of file changes.
Another curious point, in the meta box that the plugin adds to page/post edit screens, there is an checkbox titled “Disable Related Posts display”. If I check that and save the page, upon refresh it’s always unchecked again. I’ve been trying this on the homepage, the page with the most performance issues that we have.
Plugin Author
Ajay
(@ajay)
On the first, the whole HTML is saved as a meta key against each post ID. This is _crp_cache_* with a MD5 generated key for the *.
On the second, can you try editing the post and checking the meta box there to see if the Exclude feature works?
Thread Starter
Anonymous User 6087458
(@anonymized-6087458)
So the cache is in wp_postmeta? I should be able to find that with “SELECT * FROM wp_postmeta WHERE meta_key LIKE “%crp_cache%”” right ? I get no results even though cache is enabled.
Regarding the saving of the “Disable related post display” setting, yes that works. Is that something to maybe improve as it will trick people out sometimes.
Plugin Author
Ajay
(@ajay)
Hi, given that you have Query monitor, when you first visit a post, can you check the queries generated. In particular the Non-Select queries. The plugin should be inserting the respective cache keys into the post meta.
Separately, I’ve been running tests on the Disable related posts checkbox – are you trying to change this in the Quick Edit mode? Or by any chance when you’re bulk editing? I’m unable to replicate a case where it doesn’t work. I’ll be releasing 3.4.2 shortly. Would you be able to test that version?
Thread Starter
Anonymous User 6087458
(@anonymized-6087458)
Hi thanks for your replies. So it seems the saving of the checkbox works ok in 3.4.2. To clarify, I was editing pages in the normal way, not bulk editing or quick editing at any point.
Regarding the saving of cache data though… I don’t have permission to create posts on the live site as it has a large viewership and creating posts also has knock on effects such as submitting to social networks.
With that in mind, can I check how I can verify if there are cached queries by looking for existing records in the site? Right now as mentioned above my sql query returns zero records. Can you advise if that query is correct or not ?
Plugin Author
Ajay
(@ajay)
To check for cached queries, you can search for crp_cache in your meta table.