From: Stephen Soltesz <soltesz@cs.princeton.edu>
Date: Mon, 4 Aug 2008 16:44:53 +0000 (+0000)
Subject: take out of repository.
X-Git-Tag: Monitor-1.0-6~16
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=bfcba8150ee58fe6ec567315678c7dafe0413615;p=monitor.git

take out of repository.
---

diff --git a/www/soltesz.php b/www/soltesz.php
deleted file mode 100644
index bef3e03..0000000
--- a/www/soltesz.php
+++ /dev/null
@@ -1,67 +0,0 @@
-
-<?php 
-
-// PICKLE_PATH="/home/soltesz/research/planetlab/monitor3/pdb";
-define("PICKLE_PATH", "pdb");
-
-class Pickle
-{
-	public function load($name)
-	{
-		if ( ! $this->exists("production." . $name) )
-		{
-			print "Exception: No such file %s" . $name . "\n";
-			return NULL;
-		}
-		$name = "production." . $name;
-		$fname = $this->__file($name);
-		$o = unserialize(file_get_contents($fname));
-
-		return $o;
-	}
-	public function dump($name, $obj)
-	{
-		if ( ! file_exists(PICKLE_PATH) )
-		{
-			if ( ! mkdir(PICKLE_PATH, 0777, True) )
-			{
-				print "Exception: Unable to create directory :" . PICKLE_PATH . "\n";
-			}
-		}
-		$name = "production." . $name;
-		$fname = $this->__file($name);
-
-		return file_put_contents($fname, serialize($obj));
-	}
-	private function __file($name)
-	{
-		return sprintf("%s/%s.phpserial", PICKLE_PATH, $name);
-	}
-
-	public function exists($name)
-	{
-		return file_exists($this->__file($name));
-	}
-
-	public function remove($name)
-	{
-		return unlink($this->__file($name));
-	}
-
-	public function if_cached_else($cond, $name, $function)
-	{
-		if ( $cond and $this->exists("production.%s" % $name) )
-		{
-			$o = $this->load($name);
-		} else {
-			$o = $function();
-			if ($cond)
-			{
-				$this->dump($name, $o);	# cache the object using 'name'
-			}
-		}
-		return o;
-	}
-}
-
-?>