Rigel Kentaurus
Well-known member
Today while looking at my queries I realized that it was always retrieving from the xf_data_registry the "styles" key. But just that one. All the rest were happily being fetched from Memcache, but that particular query, always there.
After debugging things a little (and I actually needed to output an strlen() of the itemData), I realized that the size of my styles was bigger than 1Mb (1.3, actually), and after doing some research, turns out that MemCache's default is 1Mb, anything bigger than that will not be stored.
A workaround would be enabling compression (I had that disabled), and just deal with the fact of compressing and uncompressing everytime an object is saved and load from the cache.
The other workaround is just increasing the window size for Memcache from 1Mb to something bigger. I actually went with this one.
......
I don't have that many styles. I have 12, and a lot of them are disabled, I wonder if they make it to the cache even if disabled (my guess, yes)
Code:
SELECT data_key, data_value
FROM xf_data_registry
WHERE data_key IN ('styles')
After debugging things a little (and I actually needed to output an strlen() of the itemData), I realized that the size of my styles was bigger than 1Mb (1.3, actually), and after doing some research, turns out that MemCache's default is 1Mb, anything bigger than that will not be stored.
A workaround would be enabling compression (I had that disabled), and just deal with the fact of compressing and uncompressing everytime an object is saved and load from the cache.
The other workaround is just increasing the window size for Memcache from 1Mb to something bigger. I actually went with this one.
......
I don't have that many styles. I have 12, and a lot of them are disabled, I wonder if they make it to the cache even if disabled (my guess, yes)