mirror of
				https://github.com/Mibew/handlebars.php.git
				synced 2025-11-04 04:05:07 +03:00 
			
		
		
		
	Add cache->set method to engine
Signed-off-by: fzerorubigd <fzerorubigd@gmail.com>
This commit is contained in:
		
							parent
							
								
									eba64322c5
								
							
						
					
					
						commit
						c550491841
					
				@ -17,7 +17,8 @@
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Cache interface
 | 
			
		||||
 * Base cache interface
 | 
			
		||||
 * Base cache interface, Note that Handlebars.php never call for remove.
 | 
			
		||||
 * Driver should take care of expiered cache.
 | 
			
		||||
 *
 | 
			
		||||
 * @category  Xamin
 | 
			
		||||
 * @package   Handlebars
 | 
			
		||||
 | 
			
		||||
@ -432,6 +432,7 @@ class Handlebars_Engine
 | 
			
		||||
        if ($tree === false) {
 | 
			
		||||
            $tokens = $this->getTokenizer()->scan($source);
 | 
			
		||||
            $tree = $this->getParser()->parse($tokens);
 | 
			
		||||
            $this->getCache()->set($hash, $tree);
 | 
			
		||||
        }
 | 
			
		||||
        return $tree;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user