diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-09-06 02:42:09 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-09-06 02:42:09 +0000 |
commit | 76dac45ebaf104b312a8527a05424601ca9d520a (patch) | |
tree | 7440558a893ebf1d3816829ecbb96c3b0df9b4f0 /engine/classes/ElggSharedMemoryCache.php | |
parent | 9e8baf614938dfd1687ddce39b409c3c0e5c5753 (diff) | |
download | elgg-76dac45ebaf104b312a8527a05424601ca9d520a.tar.gz elgg-76dac45ebaf104b312a8527a05424601ca9d520a.tar.bz2 |
Refs #2220: Pulled most classes / interfaces out of lib files (except query.php and exception.php) into "classes" folder. Replaced inline classes with "require_once" statements for now. Ran unit tests to verify functionality before committing.
git-svn-id: http://code.elgg.org/elgg/trunk@6908 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes/ElggSharedMemoryCache.php')
-rw-r--r-- | engine/classes/ElggSharedMemoryCache.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/engine/classes/ElggSharedMemoryCache.php b/engine/classes/ElggSharedMemoryCache.php new file mode 100644 index 000000000..cae78943e --- /dev/null +++ b/engine/classes/ElggSharedMemoryCache.php @@ -0,0 +1,34 @@ +<?php
+/**
+ * Shared memory cache description.
+ * Extends ElggCache with functions useful to shared memory style caches (static variables, memcache etc)
+ */
+abstract class ElggSharedMemoryCache extends ElggCache {
+ /**
+ * Namespace variable used to keep various bits of the cache
+ * separate.
+ *
+ * @var string
+ */
+ private $namespace;
+
+ /**
+ * Set the namespace of this cache.
+ * This is useful for cache types (like memcache or static variables) where there is one large
+ * flat area of memory shared across all instances of the cache.
+ *
+ * @param string $namespace
+ */
+ public function setNamespace($namespace = "default") {
+ $this->namespace = $namespace;
+ }
+
+ /**
+ * Get the namespace currently defined.
+ *
+ * @return string
+ */
+ public function getNamespace() {
+ return $this->namespace;
+ }
+}
\ No newline at end of file |