Widget cache

Some pages are always built fresh. For example, pages for logged-in users, or for visitors with items in the cart. The widget cache makes these pages faster.

Go to the Cache tab, then Widgets and fragments.

Cache widgets

Your sidebar and footer widgets are built once. Then we use them again.

Some widgets are always built fresh: search, cart, login and forms.

May break: widgets that show something different to each visitor, like a random quote.

Keep widgets for

After this time, we build the widget again.

Also for logged-in users

You find this under Advanced. Each user role gets its own copy.

We never do this for editors and admins. We never do it for widgets that show the user’s name or email. We also never do it when a membership plugin is active.

When widgets are built again

  • When the page cache is cleared.
  • When you change a post, comment, menu or widget.

For developers

You can keep your own slow parts with softminal_cache_fragment():

echo softminal_cache_fragment( 'popular-posts', function () {
    my_theme_popular_posts();
}, array( 'ttl' => HOUR_IN_SECONDS ) );

Options: ttl (how many seconds to keep it), vary (none, role or user) and echo.

Still stuck? Please write to us at support.softminal.com. Our team will help you.