Questions tagged [caching]

Improving the response time, by reducing the amount of processing, in Drupal normally requires using a cache.

335 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
14
votes
0answers
1k views

How do I setup Chained fast backend, Varnish, APCu and Redis cache bins in settings.php?

On a Debian Jessie server (Nginx, PHP 5.6, Zend Opcache), I installed Apcu, Redis, Varnish. I also installed APCu, Chained fast backend, Redis and Varnish modules. In order to make these caching ...
5
votes
1answer
3k views

Clear only CSS/JavaScript cache when files are aggregated

When aggregating CSS/JavaScript files using performance page in Drupal 8, drush cc css-js doesn't work, and I've to clear/rebuild all cache. Is this a bug or the normal behavior? How do I properly ...
5
votes
1answer
937 views

Database table cache_views_data is extreme large, what size is normal?

I have a Drupal 7 site with ~70,000 nodes and ~500,000 terms. During some investigations for the cause of substantial performance problems, I found out that the database table cache_views_data is ...
3
votes
0answers
75 views

What does it mean if expire is set to null in a cache table?

I am looking at the documentation for the expire field in the cache tables and the documentation in CacheBackendInterface.php says: * @param int $expire * One of the following values: * - ...
3
votes
0answers
108 views

Warming up dynamic page cache for authenticated users

We're currently working on a rather complex Drupal 8 based website. After clearing caches, the majority of pages/routes require about 30-60 seconds for being rendered/returning the desired results. ...
3
votes
1answer
223 views

Invalidating render cache items for anonymous?

We have a certain content type in Drupal 8 that has a small grid of data on it that is populated from an API call when the node view is being built. In that call, I am checking for cache and setting ...
3
votes
1answer
887 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 ...
3
votes
0answers
645 views

Configuring Varnish for Drupal with Proper Module Usage (Expiration Cache, Varnish, Purge, Memcache)

Can someone help me straighten out my setup? What is needed...what isn't? Varnish has been working well with a high hitrate average, but I am really trying to dial in my configuration. Any insight ...
3
votes
1answer
98 views

what benefit is it to clearing the Drupal cache now that I have Varnish in front of Drupal?

Our site has Varnish in front of Drupal for anonymous user page requests so that these pages are cached. I know how to clear the Varnish cache within Varnish but my question is what benefit is it to ...
3
votes
1answer
281 views

How to avoid the following errors while adding options for Polls in our site?

We use core drupal's Poll module where admin can add options to the polls by clicking "Add option" & at the same time they can remove the options by clicking "Remove option" Here's our problem, ...
2
votes
2answers
571 views

Add cache context to altered links

I am using hook_link_alter(&$variables) to alter links depending on the user's role. I'm doing this for links in the main menu as well as for custom links shown on entities. This works good except ...
2
votes
1answer
82 views

Serve Anonymous Pages when users are logged in for some pages

so essentially I have a Drupal website with great performance for anonymous users and terrible performance for logged in users. What I am looking for is a way to serve some pages that logged in users ...
2
votes
0answers
113 views

Custom placeholder markup when leveraging #lazy_builder in elements

Using bigpipe. To avoid blocking page loads for long-lasting API calls, etc, I implement: $element = [ '#lazy_builder' => ['service.admin:method', []], '#create_placeholder' => TRUE, ]; ...
2
votes
0answers
926 views

How to properly cache AJAX request responses with the controller from my custom module?

I've got an drupal 8 project with an custom module. There I have an controller which returns specific data we need there. In my js file, I have 7 AJAX requests which are called when someone visits the ...
2
votes
0answers
361 views

D8 use Memcache for sessions only

I need to use memcache only for sessions. We have PHP 7.1, php-memcached and Drupal 8 with Memcache module. In session.php we put: $settings['memcache']['servers'] = ['192.168.177.112:11211' => '...
2
votes
1answer
51 views

Different front page depending on previous selection for anonymous users

I have a D8 project where the client wants users to select a route they will follow depending on who they are (let's call the two groups Students and Employers), and then the next time they visit show ...
2
votes
0answers
186 views

hook_link_alter() and render cache

I'm using hook_link_alter() to add specific HTML classes based on the current URL. Unfortunately this no longer works once render cached. Since this is not a render array, the #cache key doesn't ...
2
votes
1answer
148 views

Disable cache during development: Templates are not discovered

I have followed all steps reported on https://www.drupal.org/node/2598914. However, if I create an new template file in my theme folder, it does not get discovered until I flush the cache manually via ...
2
votes
1answer
585 views

CSS still requiring clearing cache after following steps to switch caching off

I have followed the steps detailed in this tutorial and many others -> https://knackforge.com/blog/rajamohamed/disable-drupal-8-cache-during-development I have copied and renamed the sites/example....
2
votes
0answers
211 views

How to reduce the memory used by a site with many domain aliases

I have a Drupal 7 site which runs on a Centos 6 x64 server with 4GB RAM, Apache, Memcache and Opcache. The drupal site has a base domain 'example.com' and 2000 domain aliases (parked domains) which ...
2
votes
0answers
129 views

Site falls over on loss of single “key” memcached instance in distributed cluster

I have a Drupal 7 site sitting behind HAProxy that is load balancing across 4 web servers. Each of these web servers is also running a memcached instance. All the Drupal applications have been ...
2
votes
0answers
79 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 ...
2
votes
1answer
272 views

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 ...
2
votes
0answers
59 views

Custom module data storage

In Drupal 6, I'm writing a custom module that generates several pages (as a Drupal newbie). Mainly public form pages for soliciting donations - users fill out their info (amount, frequency, etc.) and ...
2
votes
0answers
76 views

Drupal cache problem, strange issue

I have a site on Drupal 7. After migration on new server I have some issues. Site works normally and everything is ok, but after some time I can't see images, can't upload new images and don't work ...
2
votes
0answers
172 views

Amazon S3 module how does the local cache work and where is it at?

I'm using the Drupal Amazon S3 module and just wondered where/how the local cache works. Does it reduce file gets to S3? From what I can see there is an amazons3 table in the db and I can see ...
2
votes
1answer
532 views

ssl with boost and securepages module

I have this doubt. I have a website in drupal 7 currently live (Kickstart2) and use as cache management boost I have to buy a ssl certificate on my domain and with this certificate I would like to ...
2
votes
0answers
472 views

Drupal and cache in node_load

I have written a simple module for counting node views. For each nid I store 2 numbers: impression and view. 1 Impression is when the node is loaded and visualized in any display mode (teaser, views ...
2
votes
0answers
75 views

Calendar dateobject performance issues

I am using Drupal 7 and unfortunately there are problems with the calendar module. The calendar itself is used in a relatively small enviroment of 20-40 users, which are all registered userers with ...
2
votes
1answer
230 views

Multisite Cache Clear

I have a site with multisite settings There is one main site, where all the news are created and those are gotten by the other sites via a direct db_query via a taxonomy tid. This is the part that I ...
2
votes
0answers
96 views

Varnish and expire module adding starts with on regular expressions

I have varnish running with the expire module that sends bans into varnish when an article is published. The problem is that it doesn't expire all versions of an article. Some articles could be ...
2
votes
0answers
113 views

Clear cache changes link language prefix in field

We have a multilingual Drupal 7 install. On a lot of pages there are internal links to other pages in a textarea field, like the body field, example: When the node is saved, the internal link is ...
2
votes
0answers
1k views

recommend drupal form cache disable?

I have static page and form but in each load in devel show a lot of query (select and Insert) in cache_form table I see form_set_cache and operation but I think may disable cache_form completely is a ...
2
votes
0answers
145 views

Site not loading with memcached

I'm trying to install memcached and having no luck getting the site to run in local development using OS X 10.9 Mavericks. The homepage loads, but that's it. Everywhere else, I get this error: ...
2
votes
1answer
217 views

Is form data cached?

Is form date cached? I have an interesting bug on my site. There is a form for logged in users and it is used very frequently. Sometimes, after long time usage, some data doesn't change when it should ...
2
votes
1answer
210 views

Tuning with New Relic

So I've finally delved into tuning up my aging Drupal 6 site using NewRelic and like most I'm amazed at what their product has to offer. Very useful for honing in on problem areas. However, being new ...
2
votes
1answer
75 views

Would be creating menus totally in views reasonable?

Above question is about two situations: Standard, simple menu with 1-2 levels of depth, Catalog on commerce site, with number of products, next to every item (taxonomy term) of menu. I can imagine, ...
2
votes
2answers
619 views

hook_node_insert() sporadically not being fired after node_save()

I have a situation where, every once in a while, I'll save a new node, and hook_node_insert() appears not to be called--AT ALL, for any of the modules that implement it. For example, if I look through ...
2
votes
0answers
371 views

Problem with theme registry rebuild and drupal_get_form in a block

I'm calling a form from a custom block and having real problems getting it to function with theme registry rebuild on each page load turned off. With the registry rebuilding every page load this ...
2
votes
0answers
210 views

How can I prevent Boost front page cache being cleared on logout?

Drupal 7, Boost 7.1.beta1, cache_expiration 7.1.alpha3 - Boost seems to work for the most part except that the boost cache is cleared too often for the front page (other pages too, but less frequently ...
2
votes
1answer
360 views

Alternative to .htaccess compression with Boost

My hosting provider doesn't support mod_deflate directives in .htaccess to provide compressed HTTP responses. I am using Drupal 7 with Boost and wish to compress HTML, CSS and JS responses. Is there ...
2
votes
0answers
208 views

Random lost _page_build implementation in cache

We have an interesting trouble on couple of our sites. The hook_page_build implementations sometimes looses some value from cache. Using this cose, I get the following result: block, ...
2
votes
0answers
207 views

Drupal 6 APC with domain access module not working for (sub-)domains

I've recently enabled APC in my environment and using it with cache backport and APC beta 7.x-1.0beta3 which is a backported version for D6 modules respectively in site running drupal 6.22 which uses [...
2
votes
0answers
292 views

Boost and Varnish together in Presflow

One of my client drupal 6 site boost installed and working properly. Now they need to integrate varnish to the site. For that the site is upgraded to pressflow. The varnish is installed in server, and ...
2
votes
0answers
634 views

How to speed up json views in drupal 7

I am trying to get json response from my drupal7 site using Views. Example : www.mysite.com/company company refers to a view which was created using json document I also applied caching to the ...
2
votes
2answers
369 views

Where are the Page Manager “Caching options”?

In D7 I'm using Ctools, Panels (3), Views, Page Manager etc., but in Page Manager when gear-icon-clicking the content panes I don't find any "Caching options" as I have seen described. What reasons ...
2
votes
0answers
441 views

FileField/ImageField error: “An unrecoverable error occurred. Form missing from server cache”

After creating about 20 nodes and uploading an image in each of them (using FileField/ImageField), I get this error when trying to create another node with an image: "An unrecoverable error occurred. ...
2
votes
0answers
29 views

cache memory and linking of two sites

I have linked my drupal 7 website using xampp with php and hosted on hots gator. Where is the caching of memory happening?And how can i link the database of two sites, both made using drupal?
2
votes
1answer
192 views

Prevent caching some selected parts of a html page

I've written a small block in php (used drupal) and have enabled caching because the page contains several static images. But I don't want contents of the block to be cached. Tried to use Cache_Lite ...
2
votes
0answers
1k views

How to optimize the unserialization of “variables” cache value

As we all know, the whole variable table is being cached in the drupal cache system and is being extracted into global $conf variable in each invoke. In one of our production site with the domain ...