Skip to content
Commits on Source (5)
// $Id$
REQUIREMENTS
------------
......
// $Id$
DESCRIPTION
-----------
......
// $Id$
This is a listing of known bugs, features that mostly work but are still
somewhat in progress, features that are being considered or planned for
......
// $Id$
This lists some of the users of Boost, describing the setup of the website
in question as well as providing rationale on how Boost benefits the site.
......
<?php
// $Id$
/**
* @file
......
<?php
// $Id$
/**
* @file
......
<?php
// $Id$
/**
* @file
......
; $Id$
name = Boost
description = Provides a performance and scalability boost through caching Drupal pages as static HTML files.
package = Caching
<?php
// $Id$
/**
* @file
......
<?php
// $Id$
/**
* @file
......@@ -95,7 +94,7 @@ function boost_menu($may_cache) {
*/
function boost_init() {
// Stop right here unless we're being called for an ordinary page request
if (strpos($_SERVER['PHP_SELF'], 'index.php') === FALSE)
if (strpos($_SERVER['SCRIPT_FILENAME'], 'index.php') === FALSE)
return;
// TODO: check interaction with other modules that use ob_start(); this
......@@ -213,6 +212,12 @@ function boost_comment($comment, $op) {
if (!empty($comment['nid']))
boost_cache_expire('node/' . $comment['nid'], TRUE);
break;
case 'publish':
case 'unpublish':
case 'delete':
if (!empty($comment->nid))
boost_cache_expire('node/' . $comment->nid, TRUE);
break;
}
}
......@@ -300,7 +305,7 @@ function _boost_ob_handler($buffer) {
chdir(dirname($_SERVER['SCRIPT_FILENAME']));
// Check the currently set content type; at present we can't deal with anything else than HTML.
if (_boost_get_content_type() == 'text/html') {
if (_boost_get_content_type() == 'text/html' && _boost_get_http_status() == 200) {
if (strlen($buffer) > 0) { // Sanity check
boost_cache_set($GLOBALS['_boost_path'], $buffer);
}
......@@ -318,14 +323,27 @@ function _boost_ob_handler($buffer) {
* has overridden the content type.
*/
function _boost_get_content_type($default = NULL) {
static $regex = '/^Content-Type:\s*([\w\d\/\-]+)/i';
static $regex = '!^Content-Type:\s*([\w\d\/\-]+)!i';
return _boost_get_http_header($regex, $default);
}
/**
* Determines the HTTP response code that the current page request will be
* returning by examining the HTTP headers that have been output so far.
*/
function _boost_get_http_status($default = 200) {
static $regex = '!^HTTP/1.1\s+(\d+)!';
return (int)_boost_get_http_header($regex, $default);
}
// The last Content-Type header is the one that counts:
function _boost_get_http_header($regex, $default = NULL) {
// The last header is the one that counts:
$headers = preg_grep($regex, explode("\n", drupal_set_header()));
if (!empty($headers) && preg_match($regex, array_pop($headers), $matches))
if (!empty($headers) && preg_match($regex, array_pop($headers), $matches)) {
return $matches[1]; // found it
return $default;
}
return $default; // no such luck
}
//////////////////////////////////////////////////////////////////////////////
......@@ -138,4 +138,3 @@ DirectoryIndex index.php
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
# $Id$
......@@ -104,4 +104,3 @@ DirectoryIndex index.php
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
# $Id$
# $Id$
#
# LANGUAGE translation of Drupal (general)
# Copyright YEAR NAME <EMAIL@ADDRESS>
# Generated from files:
# boost.admin.inc,v 1.1.2.1.2.1 2007/08/06 14:48:24 arto
# boost.api.inc,v 1.3.2.1.2.1 2007/08/06 14:48:24 arto
# boost.module,v 1.3.2.2.2.1 2007/08/06 14:48:24 arto
# boost.info,v 1.1.2.1.2.1 2007/08/06 14:48:24 arto
# boost.install,v 1.2.2.1.2.1 2007/08/06 14:48:24 arto
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"POT-Creation-Date: 2007-12-03 20:55+0100\n"
"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
"Last-Translator: NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: boost.admin.inc:21
msgid "Static page cache"
msgstr ""
#: boost.admin.inc:23
msgid "Disabled"
msgstr ""
#: boost.admin.inc:24
msgid "Enabled"
msgstr ""
#: boost.admin.inc:25
msgid "Static page caching is a mechanism which stores dynamically generated web pages as HTML files in a special cache directory located under the Drupal installation directory. By caching a web page in this manner, the web server can serve it out in the fastest possible manner, without invoking PHP or Drupal at all. While this does provide a significant performance and scalability boost, you should note that it could have negative usability side-effects unless your site is targeted at an audience consisting mostly of \"anonymous\" visitors."
msgstr ""
#: boost.admin.inc:28
msgid "On high-traffic sites it can become necessary to enforce a minimum cache lifetime. The minimum cache lifetime is the minimum amount of time that will go by before the cache is emptied and recreated. A larger minimum cache lifetime offers better performance, but users will not see new content for a longer period of time."
msgstr ""
#: boost.admin.inc:33
msgid "Cache file path"
msgstr ""
#: boost.admin.inc:38
msgid "A file system path where the cache files will be stored. This directory has to exist and be writable by Drupal. The default setting is to store the files in a directory named 'cache' under the Drupal installation directory. If you change this, you must also change the URL rewrite rules in your web server configuration (.htaccess for Apache, lighttpd.conf for Lighttpd), or caching will not work."
msgstr ""
#: boost.admin.inc:54
msgid "Cache every page except the listed pages."
msgstr ""
#: boost.admin.inc:54
msgid "Cache only the listed pages."
msgstr ""
#: boost.admin.inc:55
msgid "Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are '%blog' for the blog page and %blog-wildcard for every personal blog. %front is the front page."
msgstr ""
#: boost.admin.inc:57
msgid "Cache pages for which the following PHP code returns <code>TRUE</code> (PHP-mode, experts only)."
msgstr ""
#: boost.admin.inc:58
msgid "If the PHP-mode is chosen, enter PHP code between %php. Note that executing incorrect PHP-code can severely break your Drupal site."
msgstr ""
#: boost.admin.inc:62
msgid "Cacheability settings"
msgstr ""
#: boost.admin.inc:67
msgid "Cache specific pages"
msgstr ""
#: boost.admin.inc:73
msgid "Pages"
msgstr ""
#: boost.admin.inc:94
msgid "Advanced settings"
msgstr ""
#: boost.admin.inc:100
msgid "Cache file extension"
msgstr ""
#: boost.admin.inc:105
msgid "The file extension to append to the file name of the generated cache files. Note that this setting is of no relevance to any public URLs, and it is strongly recommended to leave this as the default '.html' unless you know what you are doing. If you change this, you must also change the URL rewrite rules in your web server configuration (.htaccess for Apache, lighttpd.conf for Lighttpd), or caching will not work."
msgstr ""
#: boost.admin.inc:109
msgid "Page fetch method"
msgstr ""
#: boost.admin.inc:111
msgid "PHP fopen() wrapper"
msgstr ""
#: boost.admin.inc:111
msgid "Wget shell command"
msgstr ""
#: boost.admin.inc:111
msgid "curl shell command"
msgstr ""
#: boost.admin.inc:112
msgid "The method used to retrieve the contents of the Drupal pages to be cached. The default should work in most cases."
msgstr ""
#: boost.admin.inc:116
msgid "Pre-process function"
msgstr ""
#: boost.admin.inc:119
msgid "The name of a PHP function used to pre-process the contents of each page before writing them out to static files. The function is called with the contents of the page passed as a string argument, and its return value is used as the data written out to the disk."
msgstr ""
#: boost.api.inc:138
msgid "Unable to write file: %file"
msgstr ""
#: boost.api.inc:150
msgid "Unable to create symlink: %link to %target"
msgstr ""
#: boost.api.inc:138;150 boost.module:52;192;0
msgid "boost"
msgstr ""
#: boost.module:54 boost.info:0
msgid "Provides a performance and scalability boost through caching Drupal pages as static HTML files."
msgstr ""
#: boost.module:81 boost.info:0
msgid "Boost"
msgstr ""
#: boost.module:82
msgid "Enable or disable page caching for anonymous users and set CSS and JS bandwidth optimization options."
msgstr ""
#: boost.module:192
msgid "Expired stale files from static page cache."
msgstr ""
#: boost.module:69
msgid "administer cache"
msgstr ""
#: boost.install:21
msgid "Drupal standard page caching disabled by Boost."
msgstr ""
#: boost.install:24
msgid "Boost module successfully installed."
msgstr ""
#: boost.info:0
msgid "Caching"
msgstr ""
# Danish translation of Drupal (boost.module)
# Copyright 2007 Morten Wulff <wulff@ratatosk.net>
msgid ""
msgstr ""
"Project-Id-Version: Danish translation of Drupal (boost.module) $Id$\n"
"POT-Creation-Date: 2007-12-03 20:55+0100\n"
"PO-Revision-Date: 2007-12-15 11:33+0100\n"
"Last-Translator: Morten Wulff <wulff@ratatosk.net>\n"
"Language-Team: Danish <l10n@drupaldanmark.dk>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Language: Danish\n"
"X-Poedit-Country: DENMARK\n"
#: boost.admin.inc:21
msgid "Static page cache"
msgstr "Statisk caching af sider"
#: boost.admin.inc:23
msgid "Disabled"
msgstr "Deaktiveret"
#: boost.admin.inc:24
msgid "Enabled"
msgstr "Aktiveret"
#: boost.admin.inc:25
msgid "Static page caching is a mechanism which stores dynamically generated web pages as HTML files in a special cache directory located under the Drupal installation directory. By caching a web page in this manner, the web server can serve it out in the fastest possible manner, without invoking PHP or Drupal at all. While this does provide a significant performance and scalability boost, you should note that it could have negative usability side-effects unless your site is targeted at an audience consisting mostly of \"anonymous\" visitors."
msgstr "En statisk cache er en mekanisme, som gemmer dynamisk genererede sider som statiske HTML filer i et specielt katalog. På den måde kan webserveren vise indholdet uden at starte Drupal. Selvom det kan give betydeligt bedre ydelse og skalabilitet skal du være opmærksom på, at det kan have negative konsekvenser medmindre størstedelen af dine brugere er anonyme."
#: boost.admin.inc:28
msgid "On high-traffic sites it can become necessary to enforce a minimum cache lifetime. The minimum cache lifetime is the minimum amount of time that will go by before the cache is emptied and recreated. A larger minimum cache lifetime offers better performance, but users will not see new content for a longer period of time."
msgstr "På sites med høj trafik kan det være nødvendigt at angive en levetid for cachen. Levetiden angiver hvor lang tid der mindst skal gå før cachen tømmes og genopbygges. En længere levetid giver bedre ydelse, men der vil gå længere tid før brugerne ser nyt indhold."
#: boost.admin.inc:33
msgid "Cache file path"
msgstr "Cache-katalog"
#: boost.admin.inc:38
msgid "A file system path where the cache files will be stored. This directory has to exist and be writable by Drupal. The default setting is to store the files in a directory named 'cache' under the Drupal installation directory. If you change this, you must also change the URL rewrite rules in your web server configuration (.htaccess for Apache, lighttpd.conf for Lighttpd), or caching will not work."
msgstr "Kataloget hvor cache-filerne gemmes. Kataloget skal eksistere, og Drupal skal kunne skrive til det. Standardindstillingen er at gemme filerne i kataloget 'cache' i Drupals rodkatalog. Hvis du ændrer indstillingen, skal du også ændre omskrivningsreglerne i din webserver-konfiguration (.htaccess/lighttpd.conf) for at få cachen til at virke."
#: boost.admin.inc:54
msgid "Cache every page except the listed pages."
msgstr "Alle sider undtagen de nævnte."
#: boost.admin.inc:54
msgid "Cache only the listed pages."
msgstr "Kun de nævnte sider."
#: boost.admin.inc:55
msgid "Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are '%blog' for the blog page and %blog-wildcard for every personal blog. %front is the front page."
msgstr "Indtast én Drupal-sti pr. linje. Brug '*'-tegnet som joker. Indtast f.eks. '%blog' for blogsiden og %blog-wildcard for alle personlige blogs. %front er forsiden."
#: boost.admin.inc:57
msgid "Cache pages for which the following PHP code returns <code>TRUE</code> (PHP-mode, experts only)."
msgstr "Sider hvor følgende PHP-kode returnerer <code>SAND</code> (kun for erfarne brugere)."
#: boost.admin.inc:58
msgid "If the PHP-mode is chosen, enter PHP code between %php. Note that executing incorrect PHP-code can severely break your Drupal site."
msgstr "Hvis du vælger PHP skal du indtaste PHP-kode herover i %php. Vær opmærksom på at ugyldig PHP kode kan ødelægge dit site."
#: boost.admin.inc:62
msgid "Cacheability settings"
msgstr "Indstillinger"
#: boost.admin.inc:67
msgid "Cache specific pages"
msgstr "Gem følgende sider i cachen"
#: boost.admin.inc:73
msgid "Pages"
msgstr "Sider"
#: boost.admin.inc:94
msgid "Advanced settings"
msgstr "Avancerede indstillinger"
#: boost.admin.inc:100
msgid "Cache file extension"
msgstr "Fil-endelse"
#: boost.admin.inc:105
msgid "The file extension to append to the file name of the generated cache files. Note that this setting is of no relevance to any public URLs, and it is strongly recommended to leave this as the default '.html' unless you know what you are doing. If you change this, you must also change the URL rewrite rules in your web server configuration (.htaccess for Apache, lighttpd.conf for Lighttpd), or caching will not work."
msgstr "Fil-endelsen der sættes på alle filer i cachen. Indstillingen har ikke betydning for offentlige URLer, og det anbefales kraftigt at beholde standardinstillingen '.html', medmindre du har en god grund til at ændre den. Hvis du ændrer indstillingen, skal du også ændre omskrivningsreglerne i din webserver-konfiguration (.htaccess/lighttpd.conf) for at få cachen til at virke."
#: boost.admin.inc:109
msgid "Page fetch method"
msgstr "Hent sider med"
#: boost.admin.inc:111
msgid "PHP fopen() wrapper"
msgstr "PHP fopen() wrapper"
#: boost.admin.inc:111
msgid "Wget shell command"
msgstr "wget shell-kommando"
#: boost.admin.inc:111
msgid "curl shell command"
msgstr "curl shell-kommando"
#: boost.admin.inc:112
msgid "The method used to retrieve the contents of the Drupal pages to be cached. The default should work in most cases."
msgstr "Bestemmer hvordan indholdet af Drupals sider hentes ind i cachen. Standardindstillingen virker i de fleste tilfælde."
#: boost.admin.inc:116
msgid "Pre-process function"
msgstr "Funktion til forbehandling"
#: boost.admin.inc:119
msgid "The name of a PHP function used to pre-process the contents of each page before writing them out to static files. The function is called with the contents of the page passed as a string argument, and its return value is used as the data written out to the disk."
msgstr "Navnet på en PHP-funktion, der forbehandler hver side, før den skrives til en statisk fil. Funktionen kaldes med sidens indhold som argument, og dens returværdi skrives til disken."
#: boost.api.inc:138
msgid "Unable to write file: %file"
msgstr "Kan ikke skrive til filen: %file"
#: boost.api.inc:150
msgid "Unable to create symlink: %link to %target"
msgstr "Kan ikke oprette symbolsk henvisning: %link til %target"
#: boost.api.inc:138
#: ;150 boost.module:53
#: ;199;0
msgid "boost"
msgstr "boost"
#: boost.module:55
#: boost.info:0
msgid "Provides a performance and scalability boost through caching Drupal pages as static HTML files."
msgstr "Forbedrer ydelsen eller skalabiliteten ved at cache Drupal-sider som statiske HTML-filer."
#: boost.module:82
#: boost.info:0
msgid "Boost"
msgstr "Boost"
#: boost.module:83
msgid "Enable or disable page caching for anonymous users and set CSS and JS bandwidth optimization options."
msgstr "Aktiver eller deaktiver cache for anonyme brugere og vælg indstillinger for optimering af CSS og Javascript båndbreddeforbrug."
#: boost.module:199
msgid "Expired stale files from static page cache."
msgstr "Udløbne sider slettet fra cachen."
#: boost.module:70
msgid "administer cache"
msgstr "administrer cache"
#: boost.install:21
msgid "Drupal standard page caching disabled by Boost."
msgstr "Drupal-cache deaktiveret af Boost."
#: boost.install:24
msgid "Boost module successfully installed."
msgstr "Boost-modulet er blevet installeret."
#: boost.info:0
msgid "Caching"
msgstr "Caching"