[ Index ]

PHP Cross Reference of phpBB-3.3.0-deutsch

title

Body

[close]

/phpbb/cache/driver/ -> file.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 613 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

file:: (14 methods):
  __construct()
  load()
  unload()
  save()
  tidy()
  get()
  put()
  purge()
  destroy()
  _exists()
  sql_save()
  _read()
  _write()
  clean_varname()


Class: file  - X-Ref

ACM File Based Caching

__construct($cache_dir = null)   X-Ref
Set cache path

param: string $cache_dir Define the path to the cache directory (default: $phpbb_root_path . 'cache/')

load()   X-Ref
{@inheritDoc}


unload()   X-Ref
{@inheritDoc}


save()   X-Ref
{@inheritDoc}


tidy()   X-Ref
{@inheritDoc}


get($var_name)   X-Ref
{@inheritDoc}


put($var_name, $var, $ttl = 31536000)   X-Ref
{@inheritDoc}


purge()   X-Ref
{@inheritDoc}


destroy($var_name, $table = '')   X-Ref
{@inheritDoc}


_exists($var_name)   X-Ref
{@inheritDoc}


sql_save(\phpbb\db\driver\driver_interface $db, $query, $query_result, $ttl)   X-Ref
{@inheritDoc}


_read($filename)   X-Ref
Read cached data from a specified file

return: mixed False if an error was encountered, otherwise the data type of the cached data
param: string $filename Filename to write

_write($filename, $data = null, $expires = 0, $query = '')   X-Ref
Write cache data to a specified file

'data_global' is a special case and the generated format is different for this file:
<code>
<?php exit; ?>
(expiration)
(length of var and serialised data)
(var)
(serialised data)
... (repeat)
</code>

The other files have a similar format:
<code>
<?php exit; ?>
(expiration)
(query) [SQL files only]
(length of serialised data)
(serialised data)
</code>

return: bool True if the file was successfully created, otherwise false
param: string $filename Filename to write
param: mixed $data Data to store
param: int $expires Timestamp when the data expires
param: string $query Query when caching SQL queries

clean_varname($varname)   X-Ref
Replace slashes in the file name

return: string $varname name that is safe to use as a filename
param: string $varname name of a cache variable



Generated: Tue Apr 7 19:44:41 2020 Cross-referenced by PHPXref 0.7.1