aboutsummaryrefslogtreecommitdiff
path: root/services/cacheservice.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-03 14:00:33 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-03 14:00:33 +0000
commit29422fa55379aa61a61019b832c83dab6d450264 (patch)
treee5884ce6fed2cf1d02165a1b5667b99cd80262e5 /services/cacheservice.php
parentb8b1d06b2d899658fae64d0de506439ca0ea067c (diff)
downloadsemanticscuttle-29422fa55379aa61a61019b832c83dab6d450264.tar.gz
semanticscuttle-29422fa55379aa61a61019b832c83dab6d450264.tar.bz2
move files to new locations
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@386 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'services/cacheservice.php')
-rw-r--r--services/cacheservice.php38
1 files changed, 0 insertions, 38 deletions
diff --git a/services/cacheservice.php b/services/cacheservice.php
deleted file mode 100644
index fe66d38..0000000
--- a/services/cacheservice.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-class CacheService {
- var $basedir;
- var $fileextension = '.cache';
-
- function &getInstance() {
- static $instance;
-
- if (!isset($instance))
- $instance =& new CacheService();
-
- return $instance;
- }
-
- function CacheService() {
- $this->basedir = $GLOBALS['dir_cache'];
- }
-
- function Start($hash, $time = 300) {
- $cachefile = $this->basedir .'/'. $hash . $this->fileextension;
- if (file_exists($cachefile) && time() < filemtime($cachefile) + $time) {
- @readfile($cachefile);
- echo "\n<!-- Cached: ". date('r', filemtime($cachefile)) ." -->\n";
- unset($cachefile);
- exit;
- }
- ob_start("ob_gzhandler");
- }
-
- function End($hash) {
- $cachefile = $this->basedir .'/'. $hash . $this->fileextension;
- $handle = fopen($cachefile, 'w');
- fwrite($handle, ob_get_contents());
- fclose($handle);
- ob_flush();
- }
-}
-?> \ No newline at end of file