<commit_before># pagecache

pagecache - A fast, open source page level cache for opencart
 

## VERSION

Version 1.00

## DESCRIPTION

This is part of a collection of code intended to help improve the performance and funtionality of opencart.  See [octurbo.com](http://octurbo.com) for more information on the effort.

One of the improvements is this simple, but effective, page level cache for opencart.  It's very easy to install, consisting only of one new file and 2 minor changes to the index.php file in your main opencart directory.

It has been tested so far only on opencart 1.5.6.X, but should work on all of the 1.5.X versions, perhaps with minor tweaks.  This is a new piece of software, so we highly recommend you test it well before using.  See the CAVEATS section. 

## Requirements

- Opencart 1.5.X.  Has been tested on 1.5.6.X
- PHP 5.4 is highly recommended
  - It will run on PHP5.3, however, PHP5.3.x does not have http_response_code(), so we'll cache things that probably shouldn't be cached, like 5XX errors and "404 Not Found".  We looked at ways around this, and there's not anything elegant. It's too bad that opencart made the $headers array within system/library/response.php a private property. 

## Installation

Two simple steps.

- Copy the pagecache.php file to the system/library directory of your opencart installation.
- Read the 'index.php.changes' file, and make the two changes to your index.php file

<commit_msg>Updated documentation on pitfalls of running with PHP5.3<commit_after># pagecache

pagecache - A fast, open source page level cache for opencart
 

## VERSION

Version 1.00

## DESCRIPTION

This is part of a collection of code intended to help improve the performance and funtionality of opencart.  See [octurbo.com](http://octurbo.com) for more information on the effort.

One of the improvements is this simple, but effective, page level cache for opencart.  It's very easy to install, consisting only of one new file and 2 minor changes to the index.php file in your main opencart directory.

It has been tested so far only on opencart 1.5.6.X, but should work on all of the 1.5.X versions, perhaps with minor tweaks.  This is a new piece of software, so we highly recommend you test it well before using.  See the CAVEATS section. 

## Requirements

- Opencart 1.5.X.  Has been tested on 1.5.6.X
- PHP 5.4 is highly recommended
  - It will run on PHP5.3, however:
    - PHP5.3.x does not have http_response_code(), so we'll cache things that probably shouldn't be cached, like 5XX errors and "404 Not Found".  We looked at ways around this, and there's not anything elegant. It's too bad that opencart made the $headers array within system/library/response.php a private property. 
    - Worse, when the cached pages are served, they will have a "200 OK" status. That will result in, for example, [Soft 404's](http://googlewebmastercentral.blogspot.com/2010/06/crawl-errors-now-reports-soft-404s.html)

## Installation

Two simple steps.

- Copy the pagecache.php file to the system/library directory of your opencart installation.
- Read the 'index.php.changes' file, and make the two changes to your index.php file


{'fraction_non_alphanumeric': 0.06519685039370078, 'fraction_numerical': 0.02047244094488189, 'mean_word_length': 3.834094368340944, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1582524', 'n_tokens_mistral': 956, 'n_tokens_neox': 877, 'n_words': 465}