Caching is the use of a faster data store to improve response time, by reducing the amount of processing.

learn more… | top users | synonyms (1)

0
votes
0answers
29 views

Disable caching for the front page

How can I disable caching for the front page, programmatically?
0
votes
1answer
29 views

How do I correctly cache a themed menu output?

In mytheme_preprocess_menu(), I am altering the main menu: function mytheme_preprocess_menu(&$variables, $hook) { $node = \Drupal::routeMatch()->getParameter('node'); if ('menu__main' == $...
1
vote
2answers
59 views

Completely removing cache

I've set $settings['cache']['bins']['render'] = 'cache.backend.null; and $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null; in local.settings.php, but I’m having a hard time ...
0
votes
1answer
19 views

How to add a view mode caching dependency in my custom block?

I have a block which renders fields of a node. The output of each field is controlled in the view mode settings of the node entity. Now, how can I add caching which is depended on the view mode ...
1
vote
1answer
28 views

REST response gets cached for guest user requests

I've implemented kind of a page hit counter as REST request. The article page renders a JS into the page that does a jQuery.getJSON to the REST resource later. So far that works fine. The page is ...
0
votes
0answers
8 views

Cache set save wrong expiry time in cache table

I have created my custom bin to save cache value. cache_set('cache_key', 'cache_value', 'cache_bin_name', $expire); when I checked my bin table in mysql expire time is not same which is $expire ...
2
votes
0answers
30 views

Implementing Custom Cache Tags

I would like to use the new Cache Tagging in D8 to help keep related content of different types (entities, nodes, blocks, etc) in sync. But from reading the currently available documentation of this ...
0
votes
2answers
31 views

Change block data with page cache

I have enable page cache for anonymous users and no cache for block. There are some random data in cache that change on every page refresh. Once the page cached by cache_page bin block content is ...
2
votes
1answer
20 views

How to disable cache on view with ID as contextual filter

I've got a view (block) wich fetches images from all nodes of content type x. I use these in a slider. When I open node y, I only want to see the image of node y. So I add a contextual filter to ...
0
votes
1answer
26 views

drupal link not working on live server after moving from localhost

i have moved my drupal site from localhost to live server but all links and contents are not access able and it gives (404 Not Found error was encountered while trying to use an ErrorDocument to ...
1
vote
1answer
30 views

Is it possible to disable cache on certain fields?

I am working on a site where i'm implementing my own cookie bar module. For this module i have made it possible to write something in the CKeditor like: Where everything between the {cookie} tags ...
0
votes
1answer
30 views

How to cache a paged list?

I have a list which is built by consuming an API. The data that comes from response is not stored in Drupal which mean I am using views to create the list. The list is a paged one which shows 10 items ...
0
votes
1answer
27 views

Drupal cron is running very frequently

Drupal cron is running every 10 minutes in my site but i have set-ed 1 day time for cron, i have cleared cache and fix all the major php error logs, please help me how to fix this issue.
0
votes
1answer
14 views

How to reset Drupal's content cache / deleted content?

I'm working with Drupal 7.44. I created some content, but then deleted those articles. However, when I go to add new content, Drupal still recognizes the title of my articles that I deleted (as I'm ...
1
vote
1answer
22 views

Installed Boost module. How do you tell it is working on your site?

I just installed the Boost module on Drupal 7 and activated everything properly. How do I even tell if its working properly?
0
votes
1answer
54 views

Clear only css/js cache when files are aggregated - Drupal 8

When aggregating css/js files using performance page in Drupal, drush cc css-js Above command doesn't work, and I've to clear/rebuild all cache. Is this a bug or the normal behavior? How to ...
0
votes
0answers
18 views

Cache form table saves very large records when forms are displayed in a view

I'm opening a new issue based off of https://www.drupal.org/node/2057073 because I'm still seeing this issue in 7.x-1.13 and verified that the patch mentioned in the above issue has been rolled into ...
1
vote
1answer
31 views

Drupal 8 block cacheing

I have written a block, displayed on the right sidebar of my drupal 8 site. It reads the database, and shows today's reports. But the block's output is aggressively cached, so that it never shows the ...
1
vote
1answer
59 views

Why is cache_render very big?

I am having a big problem with a newly created Drupal 8 site for a theater. After going live we discovered that the cache_render table grown extremely big, and extremely fast. After one weekend, it ...
1
vote
2answers
43 views

Prevent block from caching

I have a custom block that reads information from the database. As the user will be filling out a form, refreshing the page and viewing the block it cannot be cached. How do I fix this? I have tried: ...
1
vote
0answers
14 views

How to change cache context array for home page

I have Drupal setup using multisite so that the contents vary with sub domain. I need to use 'url.site' in 'cache context'. But cache context array contains 'url.site' only for node pages. In home ...
3
votes
1answer
47 views

Invalidate block cache programmatically

I have a block that is cached per page. However, I need a way to invalidate it's cache in code per page or node. (Or, if no way, all cache per block id).
1
vote
0answers
22 views

Flush cache does not call custom theme functions

I have a Drupal 7 theme which is child of Bootstrap theme. When I flush cache from Configuration > Development > Performance, the primary menu disappears and the design of a custom menu breaks; when I ...
1
vote
1answer
27 views

What is the correct way to cache blocks by language?

I have a multilingual site with custom blocks in the right-hand menu - the content of which is generated dynamically through the build() function of BlockBase and which changes depending on the ...
0
votes
1answer
24 views

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table

In my site, I get the following error: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cambodia_ohchrProduction.ohchr_cache_block' doesn't exist: TRUNCATE {cache_block} ; ...
0
votes
1answer
13 views

Views Block Caching issue for not logged in User

We are using Drupal inbuilt caching with Memcache. Our website home page has more than 5 blocks created using Views for which we have enabled Time based caching. But the contents are not getting ...
0
votes
1answer
22 views

Authcache will cache user menu

I have used Authcache and memcache to cache pages for authenticated users. However, I have a user specific menu displayed at top right of every page, and the menu sometimes displayed a wrong users' ...
0
votes
1answer
141 views

Help understand/solve this Warning: Invalid argument supplied for foreach() in views that requires class registry clean to mend

Out of nowhere without any changes to the view or the views data I suddenly started receiving this error: Warning: Invalid argument supplied for foreach() in views_handler_filter->...
0
votes
1answer
38 views

Clearing cache removed all styling

I'm fairly new to Drupal, but when trying to install a new module, I was instructed to clear the cache. Now, all of the styling on my website is missing and I don't know what to do.
1
vote
2answers
29 views

How do I correctly add cache information for breadcrumb parts?

Visiting a node Foobar a breadcrumb gets created which adds the parent menu structure like so: $currentPluginId = $menu_link->getPluginId(); $trailIds = $this->menuActiveTrail->...
0
votes
0answers
23 views

How do I turn off caching of twig templates [duplicate]

I'm on mac with MAMP. I've tried to follow this : https://www.drupal.org/node/2598914 and this : Turn off Twig cache settings.local.php (i have not cut off comments in my file) : assert_options(...
3
votes
1answer
109 views

Turn off Twig cache

I did Disable Drupal 8 caching during development step by step ( also finally rebuild the cache) but yet my changes in twig files not take effects without rebuild the cache. sites/default/services....
0
votes
1answer
28 views

How to add a cache context from an existing menu?

I want to update my breadcrumb when the menu structure changes. This did not work: $breadcrumb->addCacheContexts(['route']); Whats the correct way? Edit: some more context (pun actually ...
3
votes
2answers
50 views

Anonymous user cache issue

We're having a problem with caching that is affecting anonymous users. We have a form in a block that when the user fills out the form, they are able to download a PDF. We hide the block on pages ...
0
votes
0answers
30 views

Refreshless doesn't work

I just tried to setup the RefreshLess module for my Drupal 8 site; after enabling it, I just see that some meta information is added to the DOM, but switching pages using links seems not to be ...
1
vote
0answers
18 views

Detect language when cache is enabled for anonymous

I have a multilingual site in which I need set cache page enabled for anonymous using Varnish. But if you enable page caching language is not detected for anonymous in pages without language prefix. ...
0
votes
0answers
82 views
+50

Cannot redeclare class Doctrine\Common\Annotations\Annotation\Target

I'm regularly experiencing this PHP Fatal error: Cannot redeclare class Doctrine\Common\Annotations\Annotation\Target in ?uD on line 31 This ?uD string is random. I've seen so far among others: @...
0
votes
0answers
22 views

Best caching module when certain fields are country specific

I have a site with a couple of fields that are not visible to visitors from other countries. I have used the ip2country module and some custom code in my template.php file to acheive this "file hiding"...
0
votes
1answer
15 views

Autcache + Varnish modules installed but cache tables growing

I have a site in Drupal 7, multilanguage and multidomain, and when I do a weekly manual database backup (apart from the automated ones), I see that the size of the mysqldump file is of about 200 Mb. ...
2
votes
2answers
105 views

How do I programmatically set cache age?

Drupal 8: I have the code for a block successfully doing its work and returning it. The block is called "RacerProfile" and it dumps all its content into variable "$pageContent". At the very end it ...
2
votes
2answers
124 views

cache_render database table growing in size

I am having a drupal 8 website where cache_render table is growing to GBs. I am not sure why this growing huge, any starting pointers would be helpful. Thanks
1
vote
1answer
50 views

Cache sometimes is not being updated on saving operations

This is a problem I'm struggling with for a few months already. I'm maintaining a pretty big news website, with a lot of content and multiple editors. The website is using paragraphs (which I don't ...
1
vote
1answer
55 views

Stop Varnish from caching 302 redirect from POST responses

drupal_goto() uses a 302 redirect by default, which means a lot of redirects, including form redirects, get served with a 302 response code. Having a issue in Varnish that is caching 302 response ...
1
vote
0answers
67 views

Using PrivateTempStore for anonymous users with Internal Dynamic Page Cache & Internal Page Cache modules

I'm developing a Drupal 8 project which interacts with an external API. This API handles user authentication, completely bypassing the Drupal user system. This means that logged in API users are ...
0
votes
1answer
49 views

Leverage browser caching issue [closed]

I added some lines in my .htaccess file, following Leverage browser caching on a drupal site, but Page speed tool still throws "Leverage browser caching error." for only images.
5
votes
4answers
78 views

Installed Boost Caching, but now my dynamic blocks and webforms are also cached

I just installed Boost module for Drupal 7, but now my Webforms and dynamic blocks like commerce shopping cart block isn't working. It's most likely cached, but what are some methods of getting these ...
0
votes
0answers
16 views

Reset all the cache related configurations

I am using Drupal 7 in my website. I enabled the cache option and unfortunately the website is down after some time. The hosting company told me that the website is eating too much of CPU, hence it is ...
3
votes
1answer
35 views

How to clear or rebuild a cached block for a specific user?

I have a block with the cache setting DRUPAL_CACHE_PER_USER. I want to clear the cache when a user performs a specific action. I want to clear the cached block only for the acting user, keeping the ...
2
votes
2answers
248 views

How do I get the current path of a block?

I need the current path, where my custom block is visible. So, i have written this code class MyBlock extends BlockBase { public function build() { $currentPath= \Drupal::service('path....
0
votes
1answer
30 views

deadlock with cache clear

I am trying to clear the cache or view status reports in D7 i get the below error. PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting ...