Browse Source

updating php docs

tags/v6.0.0alpha2
Thomas Müller 10 years ago
parent
commit
1274d6116d
5 changed files with 22 additions and 9 deletions
  1. 10
    5
      lib/cache.php
  2. 8
    0
      lib/cache/broker.php
  3. 2
    2
      lib/cache/usercache.php
  4. 1
    1
      lib/public/icache.php
  5. 1
    1
      tests/lib/cache.php

+ 10
- 5
lib/cache.php View File

@@ -10,17 +10,17 @@ namespace OC;

class Cache {
/**
* @var OC_Cache $user_cache
* @var Cache $user_cache
*/
static protected $user_cache;
/**
* @var OC_Cache $global_cache
* @var Cache $global_cache
*/
static protected $global_cache;

/**
* get the global cache
* @return OC_Cache
* @return Cache
*/
static public function getGlobalCache() {
if (!self::$global_cache) {
@@ -31,7 +31,7 @@ class Cache {

/**
* get the user cache
* @return OC_Cache
* @return Cache
*/
static public function getUserCache() {
if (!self::$user_cache) {
@@ -87,7 +87,7 @@ class Cache {

/**
* clear the user cache of all entries starting with a prefix
* @param string prefix (optional)
* @param string $prefix (optional)
* @return bool
*/
static public function clear($prefix='') {
@@ -95,6 +95,11 @@ class Cache {
return $user_cache->clear($prefix);
}

/**
* creates cache key based on the files given
* @param $files
* @return string
*/
static public function generateCacheKeyFromFiles($files) {
$key = '';
sort($files);

+ 8
- 0
lib/cache/broker.php View File

@@ -9,7 +9,15 @@
namespace OC\Cache;

class Broker {

/**
* @var \OC\Cache
*/
protected $fast_cache;

/**
* @var \OC\Cache
*/
protected $slow_cache;

public function __construct($fast_cache, $slow_cache) {

+ 2
- 2
lib/cache/usercache.php View File

@@ -13,7 +13,7 @@ namespace OC\Cache;
class UserCache implements \OCP\ICache {

/**
* @var OC\Cache\File $userCache
* @var \OC\Cache\File $userCache
*/
protected $userCache;

@@ -68,7 +68,7 @@ class UserCache implements \OCP\ICache {

/**
* clear the user cache of all entries starting with a prefix
* @param string prefix (optional)
* @param string $prefix (optional)
* @return bool
*/
public function clear($prefix = '') {

+ 1
- 1
lib/public/icache.php View File

@@ -48,7 +48,7 @@ interface ICache {

/**
* clear the user cache of all entries starting with a prefix
* @param string prefix (optional)
* @param string $prefix (optional)
* @return bool
*/
public function clear($prefix = '');

+ 1
- 1
tests/lib/cache.php View File

@@ -8,7 +8,7 @@

abstract class Test_Cache extends PHPUnit_Framework_TestCase {
/**
* @var OC_Cache cache;
* @var \OC\Cache cache;
*/
protected $instance;


Loading…
Cancel
Save