added database cache option

This commit is contained in:
JT Smith 2006-02-27 18:26:07 +00:00
parent d3c13840f5
commit b745ab0ef6
5 changed files with 212 additions and 1 deletions

View file

@ -1,5 +1,6 @@
6.99.0
- Added archive/unarchive options to CS threads.
- Added a database cache option as an alternative to memcached.
- Added a workflow system.
- Added a workflow scheduler system.
- Converted the runHourly.pl scripts to run as scheduled workflows.

View file

@ -35,9 +35,22 @@ ipsToCIDR();
addDisabletoRichEditor();
addNavigationMimeType();
addIndexes();
addDatabaseCache();
finish($session); # this line required
#-------------------------------------------------
sub addDatabaseCache {
print "\tAdding database cache.\n";
$session->db->write("create table cache ( namespace varchar(128) not null, cachekey varchar(128) not null, expires bigint not null, size int not null, content mediumtext, primary key (namespace, cachekey))");
$session->db->write("alter table cache add index namespace_cachekey_size (namespace,cachekey,expires)");
if ($session->config->get("memcached_servers")) {
$session->config->set("cacheType","WebGUI::Cache::Memcached");
} else {
$session->config->set("cacheType","WebGUI::Cache::FileCache");
}
}
#-------------------------------------------------
sub addIndexes {
print "\tAdding indexes to increase performance.\n";