Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

1

Once configured/initialized, the module has a wrapper class/interface Redis_Client that contains the library object. It can be retrieved with the getClient() method: $redis = Redis_Client::getClient()


0

Using only drush, you can use php-eval to run this: drush php-eval "cache_clear_all(NULL, 'cache_page');"


0

Currenty working on that. The code # One month <filesMatch ".(css|jpg|jpeg|png|gif|js|ico)$"> Header set Cache-Control "max-age=2628000, public" </filesMatch> helped me to remove images from the list below https://developers.google.com/speed/


0

Cache Control Override plugin intends to solve the problem with an anonymous user cache control. After installation, both methods will work: return array( '#markup' => date("Y-m-d H:i:s"), '#cache' => array('max-age' => 10). ); or public function getCacheMaxAge() { return 10; }


0

You can clear the static entity cache with EntityStorageBase::resetCache: \Drupal::entityTypeManager()->getStorage('parent_entity')->resetCache([$parentEntity->id()]);


1

Authcache will only attempt to cache a page and deliver a cached page respectively if every single role of the logged in user is authcache enabled. Consider the following example: Five roles are defined on the website (including the built-in ones): anonymous, authenticated, customer role 1, customer role 2, administrator. Three roles are enabled for ...


1

drush cc router when using drush 9 do the trick now :-)


0

For those who are struggling for configuring caching for Drupal 8 - Just copy the example.settings.local.php which is located outside of the files folder into files folder with settings.local.php - uncomment $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null'; - Again, uncomment $settings['cache']['bins']['page'] = 'cache.backend.null';


0

See the contrib module handy_cache_tags. I haven't used it (yet), but it purports to do exactly what you are looking for. From the module's description: The module provides the following cache tags for you to use: handy_cache_tags:[entity_type] handy_cache_tags:[entity_type]:[entity_bundle]


1

The Page Cache and Dynamic Page Cache store complete pages, but Drupal also uses the Render Cache to store page fragments (e.g. the teaser display of each node). To disable the render cache, set it to use the null backend as well: $settings['cache']['bins']['render'] = 'cache.backend.null';


3

There are three layers where rendered content can be cached: The Page Cache, which stores complete pages based on the URL for anonymous users. The Dynamic Page Cache, which stores pages with placeholders for dynamic content that is rendered on each request. The Render Cache, which stores individual rendered elements. Each has a corresponding cache bin ...


0

The correct way to do this is with: $form['#cache']['contexts'][] = 'session'; At some stage between Drupal versions max-age has stopped working


Top 50 recent answers are included