phpBB

Development Wiki

Difference between revisions of "Cache"

From phpBB Development Wiki

(Nobody has documented this yet? :o)
 
(More info mark as stub)
Line 1: Line 1:
== Cache Layer ==
+
The cache system provides an API for caching frequently used data, it provides an interface for user code to cache data and an interface for the [[DBAL]] to cache query results.
  
=== Modules ===
+
== Modules ==
  
* File
+
{|
* XCache (3.0.6 +)
+
|-
* APC (3.0.6 +)
+
! Module
* eAccelerator (3.0.6 +)
+
! Description
* Memcache (3.0.6 +)
+
! Version
 +
! File
 +
|-
 +
| File
 +
| Utilises disk drive for data storage
 +
| >= 2.1
 +
| [http://code.phpbb.com/repositories/changes/phpbb/branches/phpBB-3_0_0/phpBB/includes/acm/acm_file.php includes/acm/acm_file.php]
 +
|-
 +
| XCache [http://xcache.lighttpd.net/]
 +
| Storage of data in shared memory
 +
| >= 3.0.6
 +
| [http://code.phpbb.com/repositories/changes/phpbb/branches/phpBB-3_0_0/phpBB/includes/acm/acm_xcache.php includes/acm/acm_xcache.php]
 +
|-
 +
| APC [http://pecl.php.net/package/APC]
 +
| Storage of data in shared memory
 +
| >= 3.0.6
 +
| [http://code.phpbb.com/repositories/changes/phpbb/branches/phpBB-3_0_0/phpBB/includes/acm/acm_apc.php includes/acm/acm_apc.php]
 +
|-
 +
| eAccelerator [http://eaccelerator.net/]
 +
| Storage of data in shared memory
 +
| >= 3.0.6
 +
| [http://code.phpbb.com/repositories/changes/phpbb/branches/phpBB-3_0_0/phpBB/includes/acm/acm_eaccelerator.php includes/acm/acm_eaccelerator.php]
 +
|-
 +
| Memcache [http://php.net/memcache]
 +
| Uses a memcached instance to store data
 +
| >= 3.0.6
 +
| [http://code.phpbb.com/repositories/changes/phpbb/branches/phpBB-3_0_0/phpBB/includes/acm/acm_memcache.php includes/acm/acm_memcache.php]
 +
|}
  
==== File ====
+
=== File ===
 
As of 3.0.6-dev the file cache module uses a new improved format for its cache files.
 
As of 3.0.6-dev the file cache module uses a new improved format for its cache files.
  
Line 46: Line 73:
 
(data-n)
 
(data-n)
 
...</pre>
 
...</pre>
 +
 +
 +
{{Stub}}
 +
 +
[[Category:API]]
 +
[[Category:Concepts]]

Revision as of 23:42, 5 June 2009

The cache system provides an API for caching frequently used data, it provides an interface for user code to cache data and an interface for the DBAL to cache query results.

Modules

Module Description Version File
File Utilises disk drive for data storage >= 2.1 includes/acm/acm_file.php
XCache [1] Storage of data in shared memory >= 3.0.6 includes/acm/acm_xcache.php
APC [2] Storage of data in shared memory >= 3.0.6 includes/acm/acm_apc.php
eAccelerator [3] Storage of data in shared memory >= 3.0.6 includes/acm/acm_eaccelerator.php
Memcache [4] Uses a memcached instance to store data >= 3.0.6 includes/acm/acm_memcache.php

File

As of 3.0.6-dev the file cache module uses a new improved format for its cache files.

Where:

  • expiration := expiration timestamp
  • query := SQL query
  • bytes := number of bytes in data (except global data includes the length of var)
  • var := Variable name
  • data := Cached data


SQL queries:

<?php exit; ?>
(expiration)
(query)
(bytes)
(data)


Normal data:

<?php exit; ?>
(expiration)
(bytes)
(data)


Global data:

<?php exit; ?>
(expiration)
(bytes)
(var)
(data)
(expiration-n)
(bytes-n)
(var-n)
(data-n)
...


This article is a stub. You can help in improving Olympus Documentation by expanding it.