Things to know
==============
This is beta software, use at your own risk.

bware_cache takes a snapshot of your php code just before it's executed.
The next time the same file is called it's taken directly from the cache, 
without need for recompilation. If you have big source files avoiding recompilation 
brings a great performance improvement.

The caching is done on a file by file basis, but it's important to know that
php code can change depending on when you include it; this is especially
true when binding between functions and classes occurs; so, if you don't want
to discover strange bugs you better be sure to always include things in the
same order to preserve the same relationships between php files.

A good idea is always to define parent classes before derived ones.

Please monitor the running web server size so that if you see memory leaks
you can use MaxRequestPerChild to cause each httpd to restart.
Try to set it at 2048, 4096, your mileage may vary.

If the web site you are trying to optimize is a very busy site a good
solution would be to have a separate web server for serving static contents;
this will minimize the caching overhead (in terms of memory usage).

This code is not multithreading, currently we know it runs well with apache
on both linux and solaris installations.

This code does not work together will the Zend optimizer, we will look into
it.

Good luck.

Known Requirements
==================
apache, php, autoconf, automake, libtool, m4, perl

Compatibility
=============

This version of the cache has been successfully tested on PHP 4.0.5 and
PHP 4.1.1.

Quick install
=============

PREFIX=/usr/local/httpd4
$PREFIX/bin/phpize
./configure --enable-bware_cache=shared --with-php-config=$PREFIX/bin/php-config
make

take modules/bware_cache.so and copy in $PREFIX/__some_where__
edit php.ini and add:

	zend_extension="$PREFIX/__some_where__/bware_cache.so"
	bware_cache_enable="1"
	bware_cache_check_stamp="1"
	bware_cache_log_level="1"
	bware_cache_only="*.php *.tpl"

restart the web server.

Look at <? phpinfo() ?> page to verify the bware_cache module started well.

The options you can use inside php.ini are:

	bware_cache_enable="1"
		use "1" or "0" to enable/disable bware_cache
	bware_cache_check_stamp="1"
		this flag indicates if bware_cache has to check if scripts
		have changed since last caching (it's faster not to check).
	bware_cache_log_level="1"
		this flags is to force bware_cache to say everything it
		does (look at error_logs of your web server), better you
		start looking at what it does taking care to .php files
		you don't want to cache at all.
	bware_cache_only="*.php *.tpl"
		this is to limit (on a filename basis) which files bware_cache
		will cache. It's a list of patterns where each match can
		have the following format:

		*_string_	when the filename ends with _string_ cache it.
		_string_*	when the filename begins with _string_ cache it.
		!*_string_	when the filename ends with _string_ do not
				cache it.
		!_string_*	when the filename begins with _string_ do not
				cache it.
	
		if bware_cache_only is left empty bware_cache will try to
		cache each php file.

