Showing posts with label cache exclude. Show all posts
Showing posts with label cache exclude. Show all posts

Thursday 7 February 2019

How to dynamically clear cache in drupal 8?

It's a easy way to clear or remove cache with using this simple code.

Code: \Drupal::service('page_cache_kill_switch')->trigger();

Description: Simple write this code on your function and when your code will hit or run on any page this page cache will automatically triggered and clear.


Note: If have any suggestions or issue regarding 'How to dynamically clear cache in drupal 8?' then you can ask by comments.  

Wednesday 12 December 2018

How to disable or hide or exclude the cache from page in drupal 8 ?

Sometimes we want to face the issue that don't want to apply cache or disable cache for particular page on drupal 8. Here we have option that will help in that case and we are going to give an example with this.
First of all we want to show the name of Module that will help in that case that is "Cache Exclude" in drupal 8 or download by link "https://www.drupal.org/project/cacheexclude".
for this just install this module on project and go to the configure page of this module.

Cache Exclude




So juts put the page URL in that "Pages to exclude from caching" textarea as given example of `news`, we want to remove or disable cache from `news` page so put the URL here.
and Check the content type in "Content types to exclude from caching" that checklist. so that's the simple and effective process.

Note: If have any suggestions or issue regarding 'How to disable or hide or exclude the cache from page in drupal 8 ?' then you can ask by comments.   

How to resolve max execution time error in drupal ?

When you found error regarding 'max_execution_time' exceed, then you can follow steps for resolve this error: Steps:   You can put t...