LimeSurvey API - Master branch

EmCacheHelper
in package

Discussion here: https://bugs.limesurvey.org/view.php?id=14859 PR: https://github.com/LimeSurvey/LimeSurvey/pull/1273

Tags
since
2019-05-23
author

LimeSurvey GmbH

Table of Contents

Properties

$surveyinfo  : array<string|int, mixed>|null
Survey info from getSurveyInfo.

Methods

cacheQanda()  : mixed
clearInit()  : void
Set $surveyinfo to null. Used by tests.
flush()  : void
Flush cache for initialised survey.
get()  : mixed
Get cache value with $key for initialised survey.
init()  : void
Set survey info used by this request.
set()  : void
Set cache $value for $key for initialised survey.
useCache()  : bool
True if all conditions are met to use the emcache.

Properties

$surveyinfo

Survey info from getSurveyInfo.

protected static array<string|int, mixed>|null $surveyinfo = \null

Methods

cacheQanda()

public static cacheQanda(array<string|int, mixed> $ia[, array<string|int, mixed> $session = null ]) : mixed
Parameters
$ia : array<string|int, mixed>
$session : array<string|int, mixed> = null
Tags
todo

Setting per survey.

todo

Don't cache questions with expressions.

clearInit()

Set $surveyinfo to null. Used by tests.

public static clearInit() : void

flush()

Flush cache for initialised survey.

public static flush() : void

Should be done at all places where the cache is invalidated, e.g. at save survey/question/etc.

Tags
throws
EmCacheException

if surveyinfo is not initialised.

get()

Get cache value with $key for initialised survey.

public static get(string $key) : mixed
Parameters
$key : string

init()

Set survey info used by this request.

public static init([array<string|int, mixed>|null $surveyinfo = null ]) : void
Parameters
$surveyinfo : array<string|int, mixed>|null = null
Tags
throws
InvalidArgumentException

if $surveyinfo is null.

set()

Set cache $value for $key for initialised survey.

public static set(string $key, mixed $value) : void
Parameters
$key : string
$value : mixed

useCache()

True if all conditions are met to use the emcache.

public static useCache() : bool
Tags
todo

check ajaxmode

Return values
bool

        
On this page

Search results