BrianGilbert / OSXAegirInstaller

This script installs aegir on OSX using Homebrew
30 stars 10 forks source link

Caching #36

Closed mjroeleveld closed 9 years ago

mjroeleveld commented 9 years ago

I somehow encounter relatively aggressive caching for anonymous and logged in users during development. This despite the fact that all Drupal caching is disabled. Is this desired behaviour? If so, is there a way to disable all forms of caching for all platforms?

BrianGilbert commented 9 years ago

Are you sure this isn't browser settings? I've not had any issues myself..

Can you explain in more depth what you are seeing perhaps..?

mjroeleveld commented 9 years ago

I disabled browser cache in order to test it, but with no progression. Also, I didn't change anything with regard to Nginx or the Aegir config. To sketch the issue: when I put a drupal_set_message in the code and save the file (locally of course), I have to either reload the page 10 times or I have to drush cc all.

EDIT: clearing the cache doesn't always work immediately. EDIT2: I found that adding the 'nocache=1' url parameter fixes the problem... This means Speed Booster causes the caching. Is there a settings to disable Speed Booster for all sites/platforms? EDIT3: Adding header('X-Accel-Expires: 1'); to /private/var/aegir/config/includes/global.inc disables Speed Booster. Is this a good practice, or should it be done in another way?

mjroeleveld commented 9 years ago

Redis seems to cause other problems sometimes. I can't figure out how to disable that however..

BrianGilbert commented 9 years ago

@exofes are you at the Drupalcon extended sprints today or tomorrow? I may be able to take a look and help you out..

BrianGilbert commented 9 years ago

Actually @exofes are you talking about an aegir instance on a mac laptop or on a linux server? because my script doesn't actually install redis..

mjroeleveld commented 9 years ago

I wish I was... No, I am a student and the tickets are somewhat expensive for me. Oh, that is really strange: I am talking about the instance on my Macbook. When I encounter the problem, adding noredis=1 as URL parameter solves it (temporarily of course) and therefore I logically concluded that Redis cache was the cause. The hardest aspect however is that it occurs randomly, so I can't really say how to reproduce the problem.

As soon as I reencounter the problem, I will try to give more information.

BrianGilbert commented 9 years ago

@exofes the extended sprints are free at The Berlarge until midnight tonight.. and all day tomorrow too

mjroeleveld commented 9 years ago

Oh okay! Didn't know that.. Unfortunately I have an exam Monday, so don't have the time to travel up and down to Amsterdam.

brentratliff commented 9 years ago

Does this one line go below the php declaration:

header('X-Accel-Expires: 1');

I need to do theme development which is nearly impossible with the nginx caching. All the css files are being served up caches with suffixes like 'style.css?nginx105.' I know barracuda automatically disables them for sites with dev. or test. subdomains. There must be a way to turn off all css/js caching for all sites.

BrianGilbert commented 9 years ago

@brentratliff the steps that @joachimroeleveld mentioned above were for on a server, you shouldn't be experiencing any issues above Drupal's default caching on a site under my OSX Aegir script.

brentratliff commented 9 years ago

nginx is still caching everything and I'm not seeing my changes to css pages. I even added header('X-Accel-Expires: 0'); to settings.php and appended ?nocache=1 to the url. No luck. All drupal caching is turned off as well.

brentratliff commented 9 years ago

I know I can do it at the vhost level. Where are they located? Thanks for all your help on this Brian, I know you spend a lot of time on this.

BrianGilbert commented 9 years ago

/private/var/aegir/config/server_master/nginx/vhost.d

Be aware these files get overwritten on site verify, so you may want to do it in: /private/var/aegir/config/server_master/nginx.conf

BrianGilbert commented 9 years ago

Also.. are you saying the running drush cc all, or clearing the cache from within the website isn't working?

Because these work fine for us..

brentratliff commented 9 years ago

Yes, exactly. Not only do I have all caching turned off in drupal, safari, and chrome, but 'drush cc all' has no effect either. Nginx is still serving up cached pages to the browser.

brentratliff commented 9 years ago

The only way I can get the theme css to change is by re-saving the default theme settings after changes.