Opis
Normally, if a web page is served by the cache, its content will always be the same until the cache is cleared.
By using the shortcode provided by Content No Cache, you can display dynamic content even on pages served by cache.
You don’t need this plugin to exclude an entire page from the cache.
This plugin is intended to exclude only a portion of the page from the cache. It’s useful when a page needs to be cached, but part of its content must remain dynamic.
Example scenario:
Suppose you have a page with this content:
Hello, this is some text.
Another line of text
Another line of text
Current day: Monday
If the page is cached, the user will always see:
Hello, this is some text.
Another line of text
Another line of text
Current day: Monday
If you need the last line to show the current day dynamically, this plugin can help.
The rest of the page will be served from cache, but the plugin will update only the part you specify.
You can also uncache a portion of content by targeting a CSS class.
If you want to exclude the output of a shortcode from the cache (e.g. from another plugin), just add that shortcode to the list of uncached shortcodes.
Alternatively, add the parameter uncache="true"
to the shortcode, e.g.:
[contact_form id=”1″ uncache=”true”]
Compatible caching plugins tested with Content No Cache
- W3 Total Cache
- WP Fastest Cache
- WP Optimize
- Comet Cache
- Cache Enabler
- Hyper Cache
- WP Super Cache
- LiteSpeed Cache
- SiteGround Optimizer
- WP Rocket
All of the above caching plugins are compatible with Content No Cache.
If your preferred caching plugin is not compatible, let us know.
Main Features
- Ultra-lightweight plugin – only runs where the shortcode is used
- No jQuery, no JS libraries – just a few lines of pure JavaScript
- No database queries, no extra HTTP requests, no bloat
- Enables full-page caching even with dynamic content
- Shortcode-based – works with any builder or editor
Tips to Speed Up the Content Fetching Process
- Install Freesoul Deactivate Plugins
- Navigate to: Freesoul Deactivate Plugins => Actions => Content No Cache
- Disable all plugins that are not needed to generate the uncached content
Example
You can see Content No Cache in action by visiting this blog post:
Exclude specific content from being cached.
You’ll notice a number that changes every time you refresh the page, even though the page is fully cached.
While the example shows a changing number, you can display any dynamic content you like.
Possible Conflicts
Some plugins don’t load shortcodes during AJAX requests.
Since Content No Cache retrieves content via AJAX by default, this may cause issues with those plugins.
To resolve this, use the request="remote"
parameter in the shortcode, like this:
[content_no_cache id=”3328″ request=”remote”]
This method is slightly slower but avoids conflicts with plugins that block shortcode rendering during AJAX.
Customization
If you have special needs or advanced use cases where Content No Cache is not sufficient, the author offers custom solutions tailored to your setup.
For custom development, integration help, or consulting, feel free to reach out via the contact page:
https://josemortellaro.com/contact/
Recenzije
Suradnici i Programeri
“Content No Cache | Serve uncached partial content even when you add it to a page that is fully cached.” je softver otvorenog koda. Sljedeće osobe su doprinijele ovom dodatku.
SuradniciZainteresirani ste za razvoj?
Pregledajte kôd, pogledajte SVN spremišteili se pretplatite na dnevnik razvoja od RSS.
Dnevnik promjena
0.1.5
- Removed: Uncached content by custom PHP function for security reasons.
0.1.4
- Fix: Function phpinfo was usable as a custom uncached function.
0.1.3
- Fix: The non-published CNC elements were also fetchable. Vulnerability found by Francesco Carlucci.
0.1.2
- Fix: CNC post types not deleted on plugin deletion
- Added: filter hook to don’t add the loading style
0.1.1
- Fix: content not showing with request=”remote”
0.1.0
- Added: integration with Elementor
- Added: spinner during the loading of the content
0.0.9
*Added: action hook ‘content_no_cache_before_sending_content’
0.0.8
*Added: content_no_cache_added JavaScript event
*Added: hooks for future PRO version
0.0.7
*Added: integration with Divi Builder
0.0.6
*Fix: conflict with All In One SEO
*Fix: conflict with plugins that don’t load shortcodes during ajax requests. Need to set the parameter request=”remote” if having issues with the shortcodes
0.0.5
*Fix: malfunction if two or more elements are added to the same page
0.0.4
*Fix: PHP warning
0.0.3
*Added: integration with Freesoul Deactivate Plugins. It’s possible now to disable specific plugins whilte getting the content.
0.0.2
*Fix: semicolon after content
0.0.1
*Initial release