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)

2
votes
2answers
128 views

Limit caching for a specific page

I'm working on a module, which includes a page that displays a select from a database table. The page content is getting cached for long periods, so is out of date for users. What's the simplest way ...
0
votes
0answers
9 views

Disable Cache for a specific block [duplicate]

I'm working on new website with Drupal 8 my site is now on production. I have a block of type php that read data from an xml file. I activated both cache (Internal and Dynamic) ,so every time i change ...
0
votes
0answers
7 views

ESI callback does not work from a theme

I use https://www.drupal.org/project/esi module. I have declared the function: function _my_devel_esi_test() { return 'ESI test is successful!'; } , which has the callback ...
1
vote
1answer
25 views

Is there any way to count the number of items in cache?

In Drupal 6, I used to be able to look up the number of items via {cache_MODULENAME} table direct in SQL. Is there any way to look it up via the cache API?
0
votes
1answer
24 views

Unable to clear cache

I am facing an severe issue with Drupal instance. I am trying to clear the cache and the page is redirecting to error page. This site can’t be reached The connection was reset. ERR_CONNECTION_RESET ...
4
votes
4answers
183 views

How do I correctly setup caching for my custom block showing content depending on the current node?

I have this very basic block which just shows the current node's ID. <?php /** * @file * Contains \Drupal\mymodule\Plugin\Block\ExampleEmptyBlock. */ namespace Drupal\mymodule\Plugin\Block; ...
1
vote
0answers
45 views
+100

Cache remains stale for custom blocks after editing

My Drupal 8 website consists of multiple custom blocks created from the drupal backend user interface. As I went from dev to production settings and activating Internal Dynamic Page Cache (set to 1 ...
1
vote
1answer
28 views

Manage 2 separate page cache for the same URI

We have a multilingual website build with Drupal 7. We have a IP detection for detect Chinese users. Chinese laws do not allow the use of certain JS librairies. In our case, for one page, we use ...
0
votes
0answers
7 views

Alter field value without save it, but caching it

I want to alter a body's node value, but without saving it: the altering depend of a array of values, witch it could change sometime, so i have to update every node at each change if i save it. ...
1
vote
2answers
32 views

How do I invalidate cache of an embedded view?

I have a node type "Article" that contains a repeating Paragraphs field. One of the paragraph types let's the user embed a view using a entity reference field. When rendering an Article node ...
0
votes
2answers
35 views

clearing cache to call hooks in .module file

I have created a token in .module file. that gives current node title. But every-time I change the title of node, I have to rebuilt cache so that updated title get reflected in my token. Of-course ...
0
votes
1answer
23 views

Anyway to clear cache on Drupal 7 without any extra modules or even going to the performance page?

I'm looking for a way to clear cache easily without installing any fancy modules or going to the performance page. Is there a URL I can just visit to clear the cache? Basically try to find the ...
0
votes
0answers
18 views

Drupal Caching Files

After install and setup of my Drupal site, I've noticed that Drupal has placed a few dirs/files in my file directory like css/js. Is it safe to remove these files when I move my site? What other cache ...
2
votes
1answer
35 views

Please explain caching in complex render arrays

The Scenario In hook_block_configure(), I'm displaying a configuration form to users that is represented by a fairly complicated render array. The purpose of the form is to allow users to configure ...
0
votes
1answer
22 views

Internal server error when programmatically updating about 100 nodes

I'm writing a function that unpublishes a bunch of event-type nodes within a date range. My query pulls about 100 nodes, but I'm apparently maxing out the available memory. Here is the code in ...
0
votes
0answers
5 views

What is the best context for rendering embeddable view displays?

A view display can be rendered using views_embed_view. My question, does it make any difference in terms of performance / caching to call this function inside a node's body field or inside a ...
-1
votes
0answers
5 views

Cache Actions Modules Options Not Available

I have the cache actions module enabled but do not have the list of options as stated in the module. Clearing Drupal cache bins Clearing CSS/JS cache Clearing The cache of specific views Clearing ...
-1
votes
0answers
5 views

Cache Actions Module

I have the cache actions module enabled but do not have the list of options as stated in the module. Clearing Drupal cache bins Clearing CSS/JS cache Clearing The cache of specific views Clearing ...
1
vote
1answer
27 views

Node edit form shows cached or previous title while editing node, after updating node?

When I update a node the revision show changes in values when we see diff but after updating node when I edit node again in node edit from it shows old value ie: cached value. When I flush all cache ...
0
votes
1answer
26 views

Achievement Popup notification doesnt appear on cache page

I am using achievement module on site , it shows a popup notification when a particular achievement is reached . However due to caching (Authcache for authenticated user) , the popup doesn't appear . ...
1
vote
2answers
38 views

drupal avoid caching for a javascript when page cache is on

So I have a custom block that shows a div and a JavaScript (tried inline and file), while page cache is on. JavaScript loads a uncacheable token got generated through a php function called within ...
0
votes
0answers
75 views

Showing local tasks in toolbar with hook_toolbar: caching problem

I'm creating a module using the toolbar api showing all administrative functions in a more compact toolbar. I'm having "cache" troubles showing the local tasks in the toolbar... How can I keep these ...
1
vote
1answer
45 views

Anonymous user cache control

We have written some custom blocks that render dynamic content; unfortunately, the caching defaults cache the first render of this block (and don't refresh for authenticated users). Cache control ...
1
vote
1answer
22 views

Varnish + Adaptive Theme

Using the Adaptive theme on Acquia platform and seeing an issue with mobile rendered views being cached and served to desktop browsers with block regions hidden for mobile display. The issue seems ...
0
votes
1answer
27 views

Is in Drupal the way to cache whole region?

I have a region which contain several blocks, each of them is changed rarely. I want to cache whole region (for each user), but i can not find the solution. Watching into the sourses gives no result ...
3
votes
1answer
34 views

Is there a way to quickly disable caching for all views? (for dev work)

Is there a variable/other way to quickly disable all views caching when working on a dev server? I have a lot of views which have different caching settings, and there are times when I am doing ...
3
votes
1answer
34 views

Clear cache tables

I installed a 'test' theme and then uninstalled it. I ran drush cache-rebuild and I also cleared all caches in the Configuration->Performance menu. However when I run drush config-export, to export my ...
0
votes
0answers
19 views

commerce add to cart not adding product to cart

I have an e-commerce site. In that, I have created product listing page using views. I have added add to cart field in the view, so the every product in the view will have add to cart button. I have ...
0
votes
1answer
51 views

Why am I getting a 200 status header when the page is being served from cache?

Been running into a weird issue with all of our Drupal 8 websites, hosted on different servers. The pages are caching correctly, x-drupal-cache header shows a HIT as well. The page however has it's ...
1
vote
1answer
31 views

Context and Page Caching

Just started a gigantic Drupal build and I'm trying to validate if the Context Module is the correct option for a segmented content delivery system. It appears to be and I am optimistic. The project ...
1
vote
0answers
15 views

How to exclude execution of EntityCache module for a specific page?

The Entityсache module caches entities very deeply. The Entityсache module is incompatible with https://www.drupal.org/project/cacheexclude module as well as DRUPAL_NO_CACHE option for blocks does not ...
0
votes
1answer
21 views

Clear cache after save orders using draggable views in Drupal 7

I've used Draggableviews 7.x-2.1 module to enable drag & drop options for particular views. It works well. I've enabled cache for Anonymous users. Due to this, after save the ordering, the ...
0
votes
2answers
15 views

Block cache depending on current node and its last modification time

I am building a module with a block that outputs some informations from the current node. When i return my render array i managed to get the cache as "node dependent" using (maybe not the best method ...
0
votes
1answer
20 views

Should views search specific caching skip preprocess?

Problem I have a view powered by the Search API, which uses the views inbuilt caching - "Search Specific" in order to provide better performance. However I also run a number of theming alterations ...
1
vote
3answers
68 views

Cache clearing without drush

I am using Drupal 8, and I am wondering how I can clear more caches than the button in admin/config/development/performance does. I have had trouble with installing Drush, so I am looking for any ...
0
votes
0answers
17 views

Caching Event Subcriber

I create an event and a subscriber like this service services: courtesypage.not_found: class: Drupal\courtesypage\DefaultService arguments: [] tags: - { name: event_subscriber } ...
1
vote
2answers
44 views

How can I make my Drupal website automatically reflect the changes when the DB values change?

In performance I have caching turned off, yet if I update a value in the DB directly I have to flush the cache to see changes on my site. Why is that? (ex: using phpmyadmin and changing a value) ...
1
vote
0answers
14 views

Should I still prevent caching of pages with an Address Field?

On the Address Field module page it says there can be problems with Drupal‘s cache and anonymous authors: Address Field should work on any entity type, but if you use it on an entity type that can ...
5
votes
1answer
47 views

How to tell if a view is cached from generated HTML output?

I have a view on my page and I've cached it using Views caching. Is there a way to tell that the view is cached from the output or the headers? This question says that Drupal sets the header ...
1
vote
1answer
64 views

How to load aggregated styles / js in an 'external' script via DRUPAL_BOOTSTRAP_FULL?

I have an external script / php application that I now have to implement into a running D7 site. So far DRUPAL_BOOTSTRAP_FULL seems to do the job just fine – I can read the session, check the user ...
5
votes
2answers
93 views

Caching Views: Query results Vs Rendered Output

Can you think of an example when it would be beneficial to have the Query Results cache time be longer than the Rendered Output time? or vice versa?
4
votes
3answers
93 views

How to tell if a view gets cached?

I assume that as soon as you add a contextual filter, that is not a fixed value, the View becomes uncachable since it becomes dynamic, right? Is there a clear cut way to tell if the View gets cached ...
0
votes
0answers
10 views

Cache Actions Cache Homepage on Flag

I have a flag set in a rule to cache my site when it is selected. I need to only cache the homepage. There is not an option using the Cache Actions module to point to the homepage. Any ideas?
1
vote
2answers
29 views

Does Views cache row entity?

I have a Views of users. Does user_load($row->id); will load a user from cache?
1
vote
1answer
71 views

Drush cache clear corrupting database?

I just moved to a new computer: Windows 10 with XAMPP. As far as I know I set everything up the same as it was on my old Windows 7 computer. But now, for some reason, much of the time when I run drush ...
2
votes
2answers
38 views

Clarity on Drupal caching? [closed]

Drupal 8 uses Opcache, while most people still use APC for Drupal 7. I am not sure which of the two to use for a Drupal 7 site, because it appears there is no Opcache module for Drupal 7. There is ...
1
vote
1answer
60 views

Flush cache on specific drupal 8 page/route

I am building a CRUD form in Drupal 8. Users get navigated to it from a list that shows the entities they are editing. After an edit or add they get redirected to the list again. The list is generated ...
0
votes
1answer
19 views

Clear views cache on specific node

I want to clear the cache of specific node's view. In my database in cache_views_data table I found the cid of my view and the format is like "views_name:display:hash" but I cannot find this hash ...
0
votes
0answers
40 views

Disable Token Cache

I am using hook_tokens and i have encountered a problem with this. The Hook is working good but i have one problem, i am using dynamic data and the token is always cached ( Currently using this in ...
0
votes
0answers
56 views

stop auto flush caches

I have Drupal 7 site. somehow - every time I make any change in the site- the caches flushed (all the anonymous users can see the changes). I want that the anonymous users will be able to see the ...