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
2answers
29 views

Cache in hook preprocess page

I'm trying to get a value of GET variable in hook_preprocess_page(), but I'm having problems with the cache. Only the first time the code is executed, I can get the value of the variable to put it in ...
0
votes
1answer
16 views

Can't clear cache as drupal_test.cache_filter doesn't exist

I run into an issue, I can't clear the cache anymore as I get this error: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 La table 'drupal_test.cache_filter' n'existe pas: TRUNCATE ...
0
votes
0answers
14 views

I am unable to enable the cache blocks? [duplicate]

I want to enable the cache block, but it says block caching is inactive because you have enabled modules defining content access restrictions?i have referred the following link Why can't I disable ...
1
vote
1answer
25 views

Is it necessary to cache external api requests?

I am working on a custom module to pull tweets. Is it necessary for me to cache my request to Twitter's API, if I have both Drupal 8's Internal Page Cache and Dynamic Page Cache enabled? Can I just ...
0
votes
1answer
20 views

Drupal 8 css and images relative to root

I have the challenge that I want my site to be cache-able by and external varnish cache provider. Most of my page gets cached nicely, but elements like the ico file, images and css are written with ...
1
vote
1answer
25 views

Custom fields in user's default tab

I'm a first-time stackexchange user, long time Drupal 6 developer. I'm just starting playing with Drupal 8 and I know I'm going to love it when I get used to working in it but right now I'm in that ...
1
vote
2answers
32 views

Passing current node ID to the block template

I have a module with a custom block MyCustomBlock.php that get the nid of the current page and pass the value to the block template: $node = \Drupal::routeMatch()->getParameter('node'); $nid = ...
4
votes
1answer
53 views

Which tables should be emptied when clearing database-stored cache manually?

Prior to D8 to clear cache manually one could truncate all tables beginning with cache_. In Drupal 8 there are still tables starting with cache_, but there's also a cachetags table. Is the advice in ...
1
vote
1answer
33 views

Automatically clear cache

Theme: Basic 8.x-1.x-dev I am trying to clear theme data after any change is done to twig files. I see that rebuildThemeData is here: https://goo.gl/EA2YL4 Currently have this within my .theme ...
0
votes
0answers
23 views

Memcache - Ignore block/page

We are using Memcache in addition to Drupal's cache system. This has introduced other problems that we were not prepared for. I have tried a couple of modules that are designed to allow the exclusion ...
0
votes
2answers
30 views

Custom Block Can't Invalid the Cache

I wrote a block in Drupal 8 to render a menu based on the http headers of the request, which contains the users' information from the idp. This menu is supposed to be different from user to user, but ...
0
votes
0answers
9 views

Drupal Caching - Missing rows field

I have a view set on home page: http://www.userbase.com/ some of the row fields are blank for anonymous users. Logged in users see it fine. I assume its issue with caching. The site is getting approx ...
0
votes
1answer
25 views

TrustedResponseRedirect failing - how to prevent cache metadata?

I am getting the following when trying to redirect to an external site from my controller function defined in my routing file: return new TrustedRedirectResponse($my_ext_url); LogicException: ...
3
votes
1answer
113 views

Can I use Drupal 7's CSS/JS cache buster/token programmatically?

By default Drupal adds a cachebuster to CSS and JS resources: <style type="text/css" media="all"> @import url("http://example.com/modules/system/system.base.css?o0xoqx"); @import ...
1
vote
1answer
45 views

Twig/Drupal caching and dynamic variables

I have a template with a list of recent articles and an article itself. I want to check in the list of recent articles if the article currently viewed is there and if yes add a class to the div. This ...
3
votes
1answer
72 views

Is using a TLS/SSL termination reverse proxy currently possible in Drupal 8

I use Nginx (port 443) which terminates TLS/SSL then forwards the request to Varnish (port 80) and on to Apache (port 8080). This worked really well for D7. Am I correct in thinking that because of ...
1
vote
1answer
26 views

How to debug ajax in form?

I have a form that uses ajax submit "method", the ajax submit handler returns ajax response with complete form(the form has ajax wrapper outside of itself so no issue there) and it is not working for ...
0
votes
0answers
23 views

How to pass #cache information in field formatter to parent element?

I have a entity reference field formatter that provides #cache tags even for entities that are not displayed since I want to flush the render cache of the entity that has this field attached when the ...
0
votes
0answers
42 views

Drupal Set message not showing the message in server

Experiencing a strange problem with drupal_set_message() I have added a conditional statement inside the hook_views_pre_view based on the value from content type field. Depending on this value a ...
2
votes
2answers
19 views

Do PHP static variables persist across Batch API batch items processing?

Do PHP static variables, which do persist during a normal page request, persist between progressive Batch API runs? What about during non-progressive (command-line) batch execution? Does ...
2
votes
1answer
100 views

How do I disable Twig and block cache for a specific module?

I'm working on a module in Drupal 8 which retrieves time sensitive data from an external REST api. The data is processed and forwarded to a Block. The final data is sent to a Twig template like so: ...
0
votes
1answer
60 views

Is cache not getting cleared?

In my content type I have a field (field_fbunique) whose default value is 0; programatically, I change its value to 1 with below code and clear cache. The value is changed to 1, but when users edit ...
0
votes
1answer
28 views

Why aren't my pages caching?

My Cache-Control header is always set to must-revalidate, no-cache, post-check=0, pre-check=0, private on the front page as well as every other page. I've gone to configuration>performance and set ...
0
votes
0answers
11 views

cache table should be truncated if doing it in database?

Given this information from Clearing cache In the database Use phpMyAdmin or another tool to access the database tables and TRUNCATE (empty, not remove) all tables that start with cache_. ...
0
votes
0answers
24 views

How to add author name to view title

I have a view (user/%uid/test) which displays the list of items created by user. I want view title to be List by %author_name. For this I have used hook_view_pre_render() and used below code. if ...
0
votes
0answers
15 views

CSS Injector not serving most current version

I have made changes to a CSS Injector rule on my Drupal 7 site. Despite flushing all the caches several times, the CSS file that is included on the live site is not the most current version of the CSS ...
2
votes
0answers
30 views

Can't get rid of unexpected error on all admin pages [closed]

I've got a problem with Drupal 8. I install it and I just logged into admin acc and it logged me in right away, but when I, for example, click on "modules" or "Extend", this error shows up: The ...
0
votes
2answers
78 views

How to warm-up Twig?

I would like to warm-up Twig templates after cache rebuild or when needed. By warming-up I mean to process each twig template into php file. Is this possible without rendering the content first?
0
votes
2answers
87 views

Is there any alternative to OpCache? [closed]

I have a hosting with suPHP handler which doesn't support opcache. I want to start working on Drupal 8 sites which highly recommend opcache. Is there any alternative to opcache? Should I change my ...
0
votes
3answers
85 views

Is mandatory to clear cache for each and every change made?

It takes more time to clear caches and it also needs to be done more frequently for the each CSS or functionality wise changes. Is there any alternatives available?
0
votes
0answers
10 views

How to refresh a drupalGet() request in a test case?

My test case checks a particular page (/filter/tips, specifically) both before and after changing the site configuration. If I comment out the first drupalGet() call, it works. If the page in ...
0
votes
1answer
42 views

Bluehost cloud hosting, varnish caching issue authenticated user

I have narrowed down my problem to varnish on my cloud server provided from bluehost. When logged in you make an edit, but it is not reflected back until 5-10 minutes later. Clearing all caches, ...
7
votes
1answer
581 views

What happened to Drupal's performance?

I just installed Drupal 7 again on my cheap shared host. The installation went fine... I copied the 1098 files via FTP and installed it within 2 minutes. The standard installation (with all modules in ...
0
votes
0answers
28 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 ...
0
votes
1answer
27 views

PHP cli script for flushing drupal cache

So I have created script that flushes drupal's cache and it's ran in CLI. The problem is after first use, I can't use the script again, because some classes ('SelectQueryExtender' or ...
0
votes
1answer
20 views

User profile page title is mistake

I use login toboggan and profile2. Now I'm logged in as "user1". The I logout and login with "user2". When I then go to the user profile page of user2 I see "user1" in page title. Clearing the ...
1
vote
1answer
60 views

What are my options to rename a (huge) cache_form table which takes way to long? [closed]

I inherited a website that has cache_form more than 33Gb. I've followed the following steps: CREATE TABLE new_cache_form LIKE cache_form; RENAME TABLE cache_form TO cache_form_backup; And in ...
0
votes
2answers
14 views

Which is the cache I have to clear to refresh list of view blocks?

I created a new block (a view block) but it is not available to use in other modules (like panels). If I clear all cache then it shows up. I don't want to clear all caches but only the right one to ...
0
votes
0answers
13 views

Clearing cache for key value

Folks, a quick one - I'm caching fields e.g: $data from nodes using the following: cache_set("nids:$nid", $data, 'my_custom_cache'); I have a cron set up to clear all cached data from this bin ...
0
votes
3answers
40 views

Boost - Ignore url variables but still cache the page

It seems like I'm not the only one with this problem but none of the other issues presented a clear solution. I have a url variable called "?slide=X" which is only controlling which slide opens on ...
0
votes
0answers
26 views

How to invalidate all caches for specific entity type?

I still not entirely understand caching in Drupal 8 and I have a cron task that manually updates some values on certain entity type entities(ie. db update) -all of them, and I need to make sure that ...
2
votes
2answers
73 views

Language detection method “Browser” doesn't work if I check “Cache pages for anonymous users”

I have two method detection activated in this order: 1- URL 2- Browser Problem is that the method "Browser" doesn't work at all if "Cache pages for anonymous users" at ...
0
votes
2answers
18 views

How to fix broken file.module function 'file_ajax_progress' without hacking the core and patching after every update?

When site has enabled page cache and anonymous user tries to upload a file, he cannot see upload status progress. He see only message "Starting upload...". Bug was reported in June 2012, has a working ...
0
votes
2answers
40 views

Cache pages for anonymous users stuck on

I can't turn off the "Cache pages for anonymous users " cache option. I uncheck it and then hit save as usual but it stays on. Is there some sort of module conflict causing this or possibly an issue ...
0
votes
0answers
34 views

How to uncache Commerce cart?

In Drupal 7 Commerce, I am running into an issue with this workflow: Add item to cart Apply qualifying coupon. Correct discount is taken off item Add new item to cart with qualifying discount. Old ...
0
votes
1answer
36 views

Using the back button after logging out shows you pages from the authenticated user's session

Using the back button after logging out shows you pages from the authenticated user's session. I found a solution for this, need to set the header like this to fix this issue- ...
0
votes
2answers
118 views

Revision tab not appearing [closed]

I have just starting using Drupal today and am going through a tutorial for Drupal 7 (I am using Drupal 8). I have made several revisions; however, the Revision tab does not appear when in the Edit ...
0
votes
1answer
16 views

caching issue after updating records into database

I've developed leave management in drupal 7 but facing an issue. When leave balance is updated due to calculations then it not shows right value from database due to drupal caching. Once I clean all ...
0
votes
1answer
21 views

Is it possible to redirect users when page caching is enabled?

I use simple redirect user inside template.php with the following code: if ( isset($_GET['abc']) && $_GET['abc'] == 1 ) { drupal_goto('mypage'); } Is it possible to redirect to the page ...
1
vote
1answer
29 views

How to fix the fatal error due to cached data while migrating?

I was trying to migrate my site from one computer to another. I have imported .sql file from database from my first database (unfortunately forgot to clear cache) and created a new database in the ...