Caching for widget feeds does not work efficiently
-
Hi,
There is a problem with the caching – I get cache entries in wp_options for every distinct user!
What i expected:
if a feed is displayed via shortcode, there should be one transient cache entry for this feed for as long as the “refresh” parameter is set.What really happens:
multiple transient cache entries found in wp-options table for every individual user who requested the page where the shortcode widget is placed.Background info:
i am using the feedzy widget to display a feed without importing it. The shortcode I used is:feedzy-rss feeds="....NONPUBLIC-URL...." refresh="10_mins" max="1" feed_title="no" summary="yes" meta="" summarylength="150" thumb="no" error_empty=""
The feed is a notification RSS which is empty most of the time and has one or two items occasionally. By using error_empty I could manage to display nothing at all if the feed is empty, which is great. ( Although there is a useless empty ul /ul pair ). If there are items in the feed, the feed content shows up. Great!
However I was wondering why I was seeing different things in different browsers when testing. It turned out that feedzy obviously creates _transient_feed_ items in wp-options for every user/browser, instead of caching a feed globally.
I would accept a cached item for every combination of shortcode parameters, but it seems as if you use additional user or browser data like cookies and other stuff for calculating the cache ID.
This is not only inefficient, but also it leads to an unhealthy growth of the options table …
Regards
Ulrich
- The topic ‘Caching for widget feeds does not work efficiently’ is closed to new replies.