Overview

Namespaces

  • Kotchasan
    • Cache
    • Database
    • Http
    • Log
    • Orm
  • None
  • PHP
  • Psr
    • Cache
    • Http
      • Message
    • Log

Classes

  • ApcCache
  • Cache
  • CacheItem
  • FileCache

Exceptions

  • Exception
  • Overview
  • Namespace
  • Class
  • Tree

Class FileCache

Filesystem cache driver.

Kotchasan\KBase
Extended by Kotchasan\Cache\Cache implements Psr\Cache\CacheItemPoolInterface
Extended by Kotchasan\Cache\FileCache
Namespace: Kotchasan\Cache
Author: Goragod Wiriya admin@goragod.com
Since: 1.0
Located at Kotchasan/Cache/FileCache.php
Methods summary
public
# __construct( )

class constructor.

class constructor.

Throws

Kotchasan\Cache\Exception
ถ้าไม่สามารถสร้างแคชได้
public boolean
# clear( )

เคลียร์แคช คืนค่า true ถ้าลบเรียบร้อย, หรือ false ถ้าไม่สำเร็จ.

เคลียร์แคช คืนค่า true ถ้าลบเรียบร้อย, หรือ false ถ้าไม่สำเร็จ.

Returns

boolean
public boolean
# deleteItems( array $keys )

ลบแคชหลายๆรายการ คืนค่า true ถ้าสำเร็จ, false ถ้าไม่สำเร็จ.

ลบแคชหลายๆรายการ คืนค่า true ถ้าสำเร็จ, false ถ้าไม่สำเร็จ.

Parameters

$keys

Returns

boolean

Throws

InvalidArgumentException
public array
# getItems( array $keys = array() )

อ่านแคชหลายรายการ.

อ่านแคชหลายรายการ.

Parameters

$keys

Returns

array

Throws

InvalidArgumentException
public boolean
# hasItem( string $key )

ตรวจสอบแคช คืนค่า true ถ้ามี.

ตรวจสอบแคช คืนค่า true ถ้ามี.

Parameters

$key

Returns

boolean

Throws

InvalidArgumentException
public boolean
# save( Psr\Cache\CacheItemInterface $item )

บันทึกแคช สำเร็จคืนค่า true ไม่สำเร็จคืนค่า false.

บันทึกแคช สำเร็จคืนค่า true ไม่สำเร็จคืนค่า false.

Parameters

$item

Returns

boolean

Throws

Kotchasan\Cache\Exception
ถ้าไม่สามารถสร้างแคชได้
Methods inherited from Kotchasan\Cache\Cache
commit(), deleteItem(), getItem(), saveDeferred()
Properties summary
protected string $cache_dir

ไดเร็คทอรี่แคช.

ไดเร็คทอรี่แคช.

# null
protected integer $cache_expire

อายุของแคช (วินาที) 0 หมายถึงไม่มีการแคช.

อายุของแคช (วินาที) 0 หมายถึงไม่มีการแคช.

# 0
Properties inherited from Kotchasan\Cache\Cache
$deferred
Properties inherited from Kotchasan\KBase
$cfg, $request
Kotchasan API documentation generated by ApiGen