Uncached Posts ('wp-')
-
Hi,
I noticed that a handful of posts didn’t get cached, no matter what I do. After racking my brain for an hour or so I found out that the slugs of the concerned posts all beginn with ‘wp-‘ (yes, ‘wp’ stands for ‘WordPress’, since these are WordPress-related articles…).
A search in your code brought this line to light:
if (!$cache_stop && substr($_SERVER['REQUEST_URI'], 0, strlen($home_root) + 4) == ($home_root . '/wp-')) { $cache_stop = true; }
…which matches very neatly against 8 of my posts ??
I understand that the substring matching is less expensive than a regex, so I’ll probably just change the slugs from ‘wp-‘ to ‘wordpress-‘.
However it would have been nice to see a warning about that … maybe in the FAQ here or on your Official Page?
Anyway, thanks for the very well working and lightweight plugin!
Tom
PS: I’ve just seen that I’m not the first one to step into that pitfall.
- The topic ‘Uncached Posts ('wp-')’ is closed to new replies.