summaryrefslogtreecommitdiffstats
path: root/lib/class/database_object.abstract.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-07-09 11:57:48 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-07-09 11:57:48 +0000
commit7d63859ce355870942a3f648cff6be57e43451ea (patch)
treea97ef5585aa2395b6a1d7d14270f915674951b9a /lib/class/database_object.abstract.php
parentabc051ec758b38a709ccde8d9ce7dd9a988fbec7 (diff)
downloadampache-7d63859ce355870942a3f648cff6be57e43451ea.tar.gz
ampache-7d63859ce355870942a3f648cff6be57e43451ea.tar.bz2
ampache-7d63859ce355870942a3f648cff6be57e43451ea.zip
add rating to single song view, and include caching fix
Diffstat (limited to 'lib/class/database_object.abstract.php')
-rw-r--r--lib/class/database_object.abstract.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/class/database_object.abstract.php b/lib/class/database_object.abstract.php
index d7408f4e..0f7b379f 100644
--- a/lib/class/database_object.abstract.php
+++ b/lib/class/database_object.abstract.php
@@ -102,4 +102,17 @@ abstract class database_object {
} // add_to_cache
+ /**
+ * remove_from_cache
+ * This function clears something from the cache, there are a few places we need to do this
+ * in order to have things display correctly
+ */
+ public static function remove_from_cache($index,$id) {
+
+ if (isset(self::$object_cache[$index]) && isset(self::$object_cache[$index][$id])) {
+ unset(self::$object_cache[$index][$id]);
+ }
+
+ } // remove_from_cache
+
} // end database_object