Luracast / Restler

Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and/or RESTful API
http://luracast.com/products/restler/
GNU Lesser General Public License v2.1
1.36k stars 316 forks source link

Can't set namespace for ApcCache #327

Closed GregOriol closed 10 years ago

GregOriol commented 10 years ago

Since cache is initialized in Restler's constructor :

public function __construct($productionMode = false, $refreshCache = false)
{
...
    $this->cache = new Defaults::$cacheClass();
...
}

and ApcCache's constructor sets the namespace :

function __construct($namespace = 'restler')
{
    self::$namespace = $namespace;
}

It seems that there is no way to set the namespace as ApcCache's constructor will always override it.

Arul- commented 10 years ago

@GregOriol You are right! we will remove the constructor!

Then we can always use ApcCache::$namespace to set the namespace