I've been trying out the cache modules and then found out views has a cache function.
This is great as the site runs off views and other cache options cause trouble due to theme switching.
I've turned on the cache option for both queries and html to max settings. 6/6
Then I logged out and starting switching between views.
I am watching the server cpu in Terminal and there doesn't appear to be any difference on the cpu hit.
This suggests to me that the caching isn't happening.
What might I be doing wrong?
Would other cache modules interfere?
Do I have to turn caching on in performance? (that nails my site due to theme switching)
Or maybe it is something else causing the cpu to be high?
Anyone have an idea what should be happening?
Thanks.
Comments
Comment #1
vm commentedfirst thing you should likely do is upgrade to at least views 2.7
views has a cache table , is it being populated?
Comment #2
Bensbury commentedI'll upgrade now and get back to you.
What mysql query can I run to check the views cache?
I don't have phpadmin here and my mysql ability is weak.
Comment #3
Bensbury commentedHi,
Thanks for the quick reply.
I upgraded.
Nothing seemed to change:
I ran ....
select * from views_object_cache
And there was information in it, but it looked old.
I flushed caches, and then went to views > tools and flushed the views cache.
I went back to the mysql table and the same information was there.
So I went and ran cron.
No change in the mysql table.
I have a view called About and it doesn't appear in the cache either.
It looks like something was cached once, but it is as if the new views have no been inserted???
I don't know if that is enough information.
----------
I found two other caches:
views_cache
views_cache_data
Views cache_data appears to have the content cached.
I can see it working now!
(because it totally nailed the language switching :p )
Thanks for the help.
I guess the cpu hit is from elsewhere....
Comment #4
vm commentedmarking as fixed. In future when your issue is fixed feel free to mark as such.
Comment #5
Bensbury commentedOkay will do.
I guess the issue related to the title is fixed, because it works! Which is nice.
But it doesn't work with language switching, which is a real shame because now I can't use it.
Is it supposed to log the queries differently?
Because I thought it would recognize a query as different if the language was different... but I guess that is a PHP side thing right?
Comment #6
merlinofchaos commentedThere is an issue about language switching in cache; language is not being taken into account for the cache key. Do a search on the issue queue, I think you will find it. I can't remember if there is a patch yet.