mirror of
				https://github.com/Mibew/mibew.git
				synced 2025-11-04 04:15:19 +03:00 
			
		
		
		
	Use unexpired cache for routes by default
This commit is contained in:
		
							parent
							
								
									094139dead
								
							
						
					
					
						commit
						0f44076e48
					
				@ -45,11 +45,11 @@ class CacheLoader extends Loader
 | 
				
			|||||||
     * Constructor of the class.
 | 
					     * Constructor of the class.
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
     * @param PoolInterface $cache An instance of cache pool.
 | 
					     * @param PoolInterface $cache An instance of cache pool.
 | 
				
			||||||
     * @param int $max_age Maximum time in seconds the cache can be stored.
 | 
					     * @param int|null $max_age Maximum time in seconds the cache can be stored.
 | 
				
			||||||
     * Notice that the cache can be invalidated before the max age timeout is
 | 
					     * If the null is passed in the cache will never expired but can be
 | 
				
			||||||
     * expired.
 | 
					     * invalidated by some other resons.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public function __construct(PoolInterface $cache, $max_age = 600)
 | 
					    public function __construct(PoolInterface $cache, $max_age = null)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $this->cache = $cache;
 | 
					        $this->cache = $cache;
 | 
				
			||||||
        $this->cacheMaxAge = $max_age;
 | 
					        $this->cacheMaxAge = $max_age;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user