- Section
- Troubleshooting – Icons missing from the blocks
- Spectra Patterns
- How to Set Multiple Column Fields in Contact Form 7 Styler of Spectra?
- Styling Checkbox / Radio / Acceptance control in Contact Form 7 Designer block of Spectra
- Unable to Style Checkbox / Radio Buttons / Acceptance Control using Contact Form 7 Styler of Spectra
- Tab Index – for multiple Gravity Forms
- Getting Started With Spectra
- How to Exclude A Heading from Table of Contents?
- Spectra – Display Conditions for Blocks
- Importing Single Pages, Templates, and Block Patterns In Spectra
- How to Enable or Disable the Design Library Button
- Spectra – Copy and Paste Style
- Spectra – Container Flex property
- Spectra – Default Content Width
- Spectra – Blocks Editor Spacing
- Spectra – Collapse Panels
- Spectra – Responsive Conditions
- Spectra Pro Dynamic Content Extension
- Site Visibility
- Clearing Cache with Spectra Actions
- Quick Action Bar
- Add Multiple Instagram Accounts in Spectra
- Getting Started with Grid Builder
- Move the Title Bar to Top
- Resolving Layout Conflicts with Spectra Containers After Astra Update
- How to Register High-Privileged Users on Your Website
- Additional User Roles to Access AI Assistant
- Spectra Database Update Instructions (Version 2.0.0 and Below)
- Frequently Asked Questions – VIP Priority Support
- Whitelist an Email Address
- Installing and Importing Starter Templates
- Getting Started With Spectra
- Manually Install Spectra via FTP
- Automatic Beta Updates for Spectra
- Rollback To Previous Versions
- How to Load Google Fonts Locally
- Activate the Spectra Pro License Key
- How to Install Spectra Pro Plugin
- Translate Spectra Strings using Loco Translate
- How to Process Refund Requests?
- How to add a Transparent / Sticky header?
- How to Change the Site Logo?
- How to Change Global Styles?
- How to Disable Title on Posts, Pages?
- How to add a transparent/ sticky header for a single page/post?
- Change Header and Footer Patterns in Spectra One Theme
- Add Custom/Google Fonts In Spectra One
- How To Reset Global Default Styling?
- Manually Install Spectra One via FTP?
- Disable or Enable Header/Footer for Specific Pages/Posts
Clearing Cache with Spectra Actions
Spectra ensures your website visitors always see the latest version by working its magic behind the scenes.
Just like a temporary storage space, a website cache holds website elements to improve loading speed for returning visitors. While caching is generally helpful, sometimes it’s necessary to clear the cache to show recent updates on your website.
Spectra takes care of this automatically whenever you make changes to your website. It also integrates smoothly with popular caching plugins to manage your website’s cache efficiently.
This means you can focus on creating great content without worrying about the technical aspects.
This document explains how you can clear the cache of a website using Spectra actions.
Why You Need to Clear the Cache?
Migrating your site to a new host may bring about challenges, potentially resulting in site breakages. Furthermore, tweaking a post may disrupt CSS, affecting the display on mobile or desktop devices.
Similarly, regenerating site assets might occasionally cause the site to appear broken for your website users.
These issues commonly arise in environments with caching mechanisms like Varnish in Cloudways, file-based caching in SiteGround or something similar.
Typically, when changes are made to a page or the entire site, you should purge the cache to ensure the latest resources are served. Problems arise when the caching environment retains old resource URLs that are no longer available.
To streamline this process using Spectra actions, we’ve implemented internal hooks that allow purge functions to be seamlessly integrated.
This automation ensures that you can maintain an up-to-date and consistent experience by automatically purging outdated cache when changes are made.
We are trying to provide compatibility from our side for some of the known hosts.
How to Add Code Snippets to Your Website?
The below mentioned steps shows how to add code snippets to your WordPress website using a popular plugin called “Code Snippets.”
While we’re expanding support for various hosting providers and plugins in the future, here’s how to achieve this using Code Snippets for now:
Prerequisites:
- Ensure you have the “Code Snippets” plugin installed and activated on your WordPress website.
Steps:
- In your WordPress dashboard, locate the “Snippets” module.
- Within the “Snippets” section, look for the option to “Add New”.
- Give your code snippet a clear and descriptive title for easy identification later.
- Locate the tab labeled “Functions”. This is where you’ll paste the below attached code.
- Once you’ve pasted your code and ensured it’s correct, click the “Save Changes and Activate” button.
add_action( 'uagb_delete_uag_asset_dir', 'clear_cache' );
add_action( 'uagb_delete_page_assets', 'clear_cache' );
function clear_cache(){
// purge_cache_function(); Call cache function in your environment
}
By following these steps, you can easily add code snippets to your WordPress website using the “Code Snippets” plugin.
Frequently Asked Questions
We don't respond to the article feedback, we use it to improve our support content.