Im usign this module : http://drupal.org/project/quiz

And I am having a problem when users take the exam that answerees are not being saved correctly and moving on to the next question

I know nginx is not using varnish...

but some suggestions I found in their issur queue said to do the following:

Install the Cache Exclude module and set it to exclude quizzes. I've never tested this with Varnish, but I believe that it prevents Drupal from setting the cache headers.
* Change the Cache header to no-cache (using header()). This might not work in cases where Drupal forces a header rewrite.
* Append a random query string to the URL for each page request (again -- we did this a long time ago, too). Most configurations of Varnish do not ignore the query string. It wastes cache space temporarily, but Varnish's LRU will eventually catch up and kill the entry.
* Set a cookie. Most Varnish configurations will stop caching a page when there is an unknown cookie in the headers. Unfortunately, this will also prevent that user from getting cached content on the entire site (or until you clear the cookie).
* Force the request to use POST, which Varnish doesn't cache until you make it do so. I actually thought that Quiz did this already
* Reconfigure the Varnish VCL to never cache quiz pages (depends on a predictable URI)
* Add a header in Quiz (e.g. header('X-Drupal-Quiz: Yes')) and then configure Varnish to not cache anything with that header

I really need to get this worked out as I have finals approaching, and I am having a very difficult time getting quiz to function correctly....

Thanks for any help.

Comments

AntiNSA’s picture

Title: Havign a problem integrating the Quiz Module with Barracuda/Octopus, how to disable caching for Quiz content type? » Havign a problem integrating the Quiz Module with SPEEDBOOSTER, how to disable caching for Quiz content type?
Category: feature » bug

After testingmultiple browsers and disabling step by step every kind of aggregation of css / javascript, caching, cnaching module, and finally speedbooster, it seems that speedbooster is what causes the QUIZ module problems. What problems? I mean you can not go more than 4-7 questions with out the score being recorded or the question beign repeated. Disabling speedbooster by placing ubercart dir with README.txt allowed the quiz module to work correctly.......

omega8cc’s picture

Category: bug » feature
Priority: Major » Normal

The speed booster is designed to cache the content aggresively.

We can't add exceptions to all possible contrib modules out there, as it would be against the whole idea of adding extra performance to all hosted sites.

If you need to extend already existing exceptions, you are requesting a *feature*, not reporting a bug.

Note: it is not possible to disable the speed booster per module or content type. It is possible to disable it per *path* or per *site* or per *platform*.

You can extend existing exceptions visible in the /data/conf/global.inc file in your custom overrides in /data/conf/override.global.inc (this files must be created).

omega8cc’s picture

Title: Havign a problem integrating the Quiz Module with SPEEDBOOSTER, how to disable caching for Quiz content type? » Havign a problem integrating the Quiz Module with Speed Booster, how to disable caching for Quiz content type?

Please don't use CAPS.

AntiNSA’s picture

Title: Havign a problem integrating the Quiz Module with Speed Booster, how to disable caching for Quiz content type? » Havign a problem integrating the Quiz Module with SPEEDBOOSTER, how to disable caching for Quiz content type?

I dont think I could disable it by path as it has a standard path for quiz nodes... like /node/120359 ...... Well I know a lot of schools use drupal and hope you will consider integrating support for this. Would be useful. Thanks for the awesome system.

Right now I am disabling speed booster.... if you have any more info on how to do that wiht an override.global.inc Ide apreciate it..

omega8cc’s picture

Title: Havign a problem integrating the Quiz Module with SPEEDBOOSTER, how to disable caching for Quiz content type? » Havign a problem integrating the Quiz Module with Speed Booster, how to disable caching for Quiz content type?

Please turn off CAPS.

omega8cc’s picture

In this case you may want to use Pathauto to generate some special path for this content type and then use that path to create exception instead of disabling the speed booster completely.

AntiNSA’s picture

sorry about the caps... ok I will try to use path auto... I wonder if apthauto uses so many server resources vs the performance of the speedboost that it is worth the trade?

Imm looking for how to create that override and cant find it... I will try pathauto... can you tell me where I can see an example of how to create this file and list a pathauto alias so only it is affected and everything else works as normal with speed booster?

Thanks!

AntiNSA’s picture

<?php # override global settings.php

// this file should be created as /data/conf/override.global.inc

if (isset($_SERVER['HTTP_HOST']) && preg_match("/(?:thecenterofthenet\.com/quiz/*)/", $_SERVER['HTTP_HOST'])) {
  $use_cache = 'NO';  // disable Memcached + Redis cache for listed domains
}

would this disable speedboost caching for all caching for www.thecenterofthenet.com/quiz/*** and thecenterofthenet.com/quiz/*****

????? Thanks for any info....

omega8cc’s picture

You need something like this:

<?php # override global settings.php

  if (preg_match("/^\/(?:quiz|anyname)/", $_SERVER['REQUEST_URI'])) {
    header('X-Accel-Expires: 0'); // do not cache it in the speed booster
  }
omega8cc’s picture

Title: Havign a problem integrating the Quiz Module with Speed Booster, how to disable caching for Quiz content type? » How to disable Speed Booster per content type?
omega8cc’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.