classes-Com-Tecnick-File-Cache

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

Cache

in package

Com\Tecnick\Pdf\File\Cache

Tags
since
2011-05-23
category

Library

author

Nicola Asuni info@tecnick.com

copyright

2011-2016 Nicola Asuni - Tecnick.com LTD

license

http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)

link
https://github.com/tecnickcom/tc-lib-pdf-filecache

Table of Contents

$path  : string
Cache path
$prefix  : string
File prefix
__construct()  : mixed
Set the file prefix (common name)
delete()  : mixed
Delete cached files
getCachePath()  : string
Get the cache directory path
getFilePrefix()  : string
Get the file prefix
getNewFileName()  : string
Returns a temporary filename for caching files
setCachePath()  : mixed
Set the default cache directory path
defineSystemCachePath()  : mixed
Set the K_PATH_CACHE constant (if not set) to the default system directory for temporary files
normalizePath()  : string
Normalize cache path

Properties

$path

Cache path

protected static string $path

$prefix

File prefix

protected static string $prefix

Methods

__construct()

Set the file prefix (common name)

public __construct([string $prefix = null ]) : mixed
Parameters
$prefix : string = null

Common prefix to be used for all cache files

Return values
mixed

delete()

Delete cached files

public delete([string $type = null ][, string $key = null ]) : mixed
Parameters
$type : string = null

Type of files to delete

$key : string = null

Specific file key to delete

Return values
mixed

getCachePath()

Get the cache directory path

public getCachePath() : string
Return values
string

getFilePrefix()

Get the file prefix

public getFilePrefix() : string
Return values
string

getNewFileName()

Returns a temporary filename for caching files

public getNewFileName([string $type = 'tmp' ][, string $key = '0' ]) : string
Parameters
$type : string = 'tmp'

Type of file

$key : string = '0'

File key (used to retrieve file from cache)

Return values
string

filename

setCachePath()

Set the default cache directory path

public setCachePath([string|null $path = null ]) : mixed
Parameters
$path : string|null = null

Cache directory path; if null use the K_PATH_CACHE value

Return values
mixed

defineSystemCachePath()

Set the K_PATH_CACHE constant (if not set) to the default system directory for temporary files

protected defineSystemCachePath() : mixed
Return values
mixed

normalizePath()

Normalize cache path

protected normalizePath(string $path) : string
Parameters
$path : string

Path to normalize

Return values
string
 

© 2004-2023 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy