MIF_E31222691/laravel/cache/drivers/sectionable.php

74 lines
1.7 KiB
PHP

<?php namespace Laravel\Cache\Drivers;
interface Sectionable {
/**
* Retrieve a sectioned item from the cache driver.
*
* @param string $section
* @param string $key
* @param mixed $default
* @return mixed
*/
public function get_from_section($section, $key, $default = null);
/**
* Write a sectioned item to the cache.
*
* @param string $section
* @param string $key
* @param mixed $value
* @param int $minutes
* @return void
*/
public function put_in_section($section, $key, $value, $minutes);
/**
* Write a sectioned item to the cache that lasts forever.
*
* @param string $section
* @param string $key
* @param mixed $value
* @return void
*/
public function forever_in_section($section, $key, $value);
/**
* Get a sectioned item from the cache, or cache and return the default value.
*
* @param string $section
* @param string $key
* @param mixed $default
* @param int $minutes
* @return mixed
*/
public function remember_in_section($section, $key, $default, $minutes, $function = 'put');
/**
* Get a sectioned item from the cache, or cache the default value forever.
*
* @param string $section
* @param string $key
* @param mixed $default
* @return mixed
*/
public function sear_in_section($section, $key, $default);
/**
* Delete a sectioned item from the cache.
*
* @param string $section
* @param string $key
* @return void
*/
public function forget_in_section($section, $key);
/**
* Delete an entire section from the cache.
*
* @param string $section
* @return int|bool
*/
public function forget_section($section);
}