forked from Open-Web-Analytics/Open-Web-Analytics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
padams
committed
Feb 2, 2022
1 parent
c1c8234
commit 1c74156
Showing
3 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
// | ||
// Open Web Analytics - An Open Source Web Analytics Framework | ||
// | ||
// Copyright 2006 Peter Adams. All rights reserved. | ||
// | ||
// Licensed under GPL v2.0 http://www.gnu.org/copyleft/gpl.html | ||
// | ||
|
||
/** | ||
* 011 Schema Update Class | ||
* | ||
*/ | ||
|
||
class owa_base_011_update extends owa_update { | ||
|
||
var $schema_version = 11; | ||
|
||
function up($force = true) { | ||
|
||
$s = owa_coreAPI::serviceSingleton(); | ||
$file = OWA_MODULES_DIR . 'fileCache/classes/fileCache.php'; | ||
$class_info = array( 'owa_fileCache', $file, [] ); | ||
$s->setMapValue( 'object_cache_types', 'file', $class_info); | ||
|
||
owa_coreAPI::setSetting('base', 'cache_objects', true); | ||
owa_coreAPI::setSetting('base', 'cacheType', 'file'); | ||
|
||
$cache = owa_coreAPI::cacheSingleton(); | ||
|
||
if ( $cache->flush() ) { | ||
|
||
owa_coreAPI::notice('Cache Flushed'); | ||
return true; | ||
|
||
} else { | ||
$this->e->notice('Could not flush cache.'); | ||
return false; | ||
} | ||
|
||
} | ||
|
||
function down() { | ||
|
||
return true; | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -221,6 +221,8 @@ function flush() { | |
} | ||
} | ||
} | ||
|
||
return true; | ||
} | ||
|
||
function setCacheDir($dir) { | ||
|