Retrieve() public method

public Retrieve ( $Key )
示例#1
0
 public function __construct(callable $DomainDatabaseMapFactory, IConnection $Connection, IProxyGenerator $ProxyGenerator, Functional\IReader $FunctionReader, Functional\IParser $FunctionParser, Cache\ICache $Cache)
 {
     $this->Cache = $Cache;
     $DomainDatabaseMap = $this->Cache->Retrieve(self::DomainDatabaseMapInstanceKey);
     if (!$DomainDatabaseMap instanceof \Storm\Core\Mapping\DomainDatabaseMap) {
         $DomainDatabaseMap = $DomainDatabaseMapFactory();
         $this->Cache->Save(self::DomainDatabaseMapInstanceKey, $DomainDatabaseMap);
     }
     parent::__construct($DomainDatabaseMap, $Connection, $ProxyGenerator, $FunctionReader, $FunctionParser);
 }
示例#2
0
 public final function GetFromCache(Object\Identity $Identity)
 {
     $IdentityHash = $Identity->Hash();
     return $this->Cache->Contains($IdentityHash) ? $this->Cache->Retrieve($IdentityHash) : null;
 }