File: apc.php

package info (click to toggle)
codelite 12.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 95,112 kB
  • sloc: cpp: 424,040; ansic: 18,284; php: 9,569; lex: 4,186; yacc: 2,820; python: 2,294; sh: 312; makefile: 51; xml: 13
file content (353 lines) | stat: -rw-r--r-- 12,863 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
<?php

// Start of apc v.

/**
 * Fetch a stored variable from the cache
 * @link http://www.php.net/manual/en/function.apc-fetch.php
 * @param key mixed <p>
 *       The key used to store the value (with
 *       apc_store). If an array is passed then each
 *       element is fetched and returned.
 *      </p>
 * @param success bool[optional] <p>
 *       Set to true in success and false in failure.
 *      </p>
 * @return mixed The stored variable or array of variables on success; false on failure
 */
function apc_fetch ($key, &$success = null) {}

/**
 * Cache a variable in the data store
 * @link http://www.php.net/manual/en/function.apc-store.php
 * @param key string <p>
 *       Store the variable using this name. keys are
 *       cache-unique, so storing a second value with the same
 *       key will overwrite the original value.
 *      </p>
 * @param var mixed <p>
 *       The variable to store
 *      </p>
 * @param ttl int[optional] <p>
 *       Time To Live; store var in the cache for
 *       ttl seconds. After the
 *       ttl has passed, the stored variable will be
 *       expunged from the cache (on the next request). If no ttl
 *       is supplied (or if the ttl is
 *       0), the value will persist until it is removed from
 *       the cache manually, or otherwise fails to exist in the cache (clear,
 *       restart, etc.).
 *      </p>
 * @return bool Returns true on success, false on failure.
 *   Second syntax returns array with error keys.
 */
function apc_store ($key, $var, $ttl = null) {}

/**
 * Cache a new variable in the data store
 * @link http://www.php.net/manual/en/function.apc-add.php
 * @param key string <p>
 *       Store the variable using this name. keys are
 *       cache-unique, so attempting to use apc_add to
 *       store data with a key that already exists will not overwrite the
 *       existing data, and will instead return false. (This is the only
 *       difference between apc_add and
 *       apc_store.)
 *      </p>
 * @param var mixed <p>
 *       The variable to store
 *      </p>
 * @param ttl int[optional] <p>
 *       Time To Live; store var in the cache for
 *       ttl seconds. After the
 *       ttl has passed, the stored variable will be
 *       expunged from the cache (on the next request). If no ttl
 *       is supplied (or if the ttl is
 *       0), the value will persist until it is removed from
 *       the cache manually, or otherwise fails to exist in the cache (clear,
 *       restart, etc.).
 *      </p>
 * @return bool TRUE if something has effectively been added into the cache, FALSE otherwise.
 *   Second syntax returns array with error keys.
 */
function apc_add ($key, $var, $ttl = null) {}

/**
 * Removes a stored variable from the cache
 * @link http://www.php.net/manual/en/function.apc-delete.php
 * @param key string <p>
 *       The key used to store the value (with
 *       apc_store).
 *      </p>
 * @return mixed Returns true on success, false on failure.
 */
function apc_delete ($key) {}

/**
 * Retrieves cached information from APC's data store
 * @link http://www.php.net/manual/en/function.apc-cache-info.php
 * @param cache_type string[optional] <p>
 *       If cache_type is "user",
 *       information about the user cache will be returned.
 *      </p>
 *      <p> 
 *       If cache_type is "filehits",
 *       information about which files have been served from the bytecode cache 
 *       for the current request will be returned. This feature must be enabled at
 *       compile time using --enable-filehits.
 *      </p>
 *      <p>
 *       If an invalid or no cache_type is specified, information about 
 *       the system cache (cached files) will be returned.
 *      </p>
 * @param limited bool[optional] <p>
 *       If limited is true, the
 *       return value will exclude the individual list of cache entries.  This
 *       is useful when trying to optimize calls for statistics gathering.
 *      </p>
 * @return array Array of cached data (and meta-data)&return.falseforfailure;
 */
function apc_cache_info ($cache_type = null, $limited = null) {}

/**
 * Clears the APC cache
 * @link http://www.php.net/manual/en/function.apc-clear-cache.php
 * @param cache_type string[optional] <p>
 *       If cache_type is "user", the
 *       user cache will be cleared; otherwise, the system cache (cached files)
 *       will be cleared.
 *      </p>
 * @return bool true always
 */
function apc_clear_cache ($cache_type = null) {}

/**
 * Defines a set of constants for retrieval and mass-definition
 * @link http://www.php.net/manual/en/function.apc-define-constants.php
 * @param key string <p>
 *       The key serves as the name of the constant set
 *       being stored. This key is used to retrieve the
 *       stored constants in apc_load_constants.
 *      </p>
 * @param constants array <p>
 *       An associative array of constant_name => value
 *       pairs. The constant_name must follow the normal
 *       constant naming rules.
 *       value must evaluate to a scalar value.
 *      </p>
 * @param case_sensitive bool[optional] <p>
 *       The default behaviour for constants is to be declared case-sensitive;
 *       i.e. CONSTANT and Constant
 *       represent different values. If this parameter evaluates to false the
 *       constants will be declared as case-insensitive symbols.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function apc_define_constants ($key, array $constants, $case_sensitive = null) {}

/**
 * Loads a set of constants from the cache
 * @link http://www.php.net/manual/en/function.apc-load-constants.php
 * @param key string <p>
 *       The name of the constant set (that was stored with
 *       apc_define_constants) to be retrieved.
 *      </p>
 * @param case_sensitive bool[optional] <p>
 *       The default behaviour for constants is to be declared case-sensitive;
 *       i.e. CONSTANT and Constant
 *       represent different values. If this parameter evaluates to false the
 *       constants will be declared as case-insensitive symbols.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function apc_load_constants ($key, $case_sensitive = null) {}

/**
 * Retrieves APC's Shared Memory Allocation information
 * @link http://www.php.net/manual/en/function.apc-sma-info.php
 * @param limited bool[optional] <p>
 *       When set to false (default) apc_sma_info will
 *       return a detailed information about each segment.
 *      </p>
 * @return array Array of Shared Memory Allocation data; false on failure.
 */
function apc_sma_info ($limited = null) {}

/**
 * Stores a file in the bytecode cache, bypassing all filters.
 * @link http://www.php.net/manual/en/function.apc-compile-file.php
 * @param filename string <p>
 *       Full or relative path to a PHP file that will be compiled and stored in
 *       the bytecode cache.
 *      </p>
 * @param atomic bool[optional] 
 * @return mixed Returns true on success, false on failure.
 */
function apc_compile_file ($filename, $atomic = null) {}

/**
 * Get a binary dump of the given files and user variables
 * @link http://www.php.net/manual/en/function.apc-bin-dump.php
 * @param files array[optional] <p>
 *      The files. Passing in &null; signals a dump of every entry, while
 *      passing in array will dump nothing.
 *     </p>
 * @param user_vars array[optional] <p>
 *      The user vars. Passing in &null; signals a dump of every entry, while
 *      passing in array will dump nothing.
 *     </p>
 * @return string a binary dump of the given files and user variables from the APC cache,
 *   false if APC is not enabled, or &null; if an unknown error is encountered.
 */
function apc_bin_dump (array $files = null, array $user_vars = null) {}

/**
 * Output a binary dump of cached files and user variables to a file
 * @link http://www.php.net/manual/en/function.apc-bin-dumpfile.php
 * @param files array <p>
 *      The file names being dumped.
 *     </p>
 * @param user_vars array <p>
 *      The user variables being dumped.
 *     </p>
 * @param filename string <p>
 *      The filename where the dump is being saved.
 *     </p>
 * @param flags int[optional] <p>
 *      Flags passed to the filename stream. See the
 *      file_put_contents documentation for details.
 *     </p>
 * @param context resource[optional] <p>
 *      The context passed to the filename stream. See the
 *      file_put_contents documentation for details.
 *     </p>
 * @return int The number of bytes written to the file, otherwise
 *   false if APC is not enabled, filename is an invalid file name,
 *   filename can't be opened, the file dump can't be completed
 *   (e.g., the hard drive is out of disk space), or an unknown error was encountered.
 */
function apc_bin_dumpfile (array $files, array $user_vars, $filename, $flags = null, $context = null) {}

/**
 * Load a binary dump into the APC file/user cache
 * @link http://www.php.net/manual/en/function.apc-bin-load.php
 * @param data string <p>
 *      The binary dump being loaded, likely from
 *      apc_bin_dump.
 *     </p>
 * @param flags int[optional] <p>
 *      Either APC_BIN_VERIFY_CRC32, APC_BIN_VERIFY_MD5,
 *      or both.
 *     </p>
 * @return bool true if the binary dump data was loaded
 *   with success, otherwise false is returned. false is returned if APC
 *   is not enabled, or if the data is not a valid APC
 *   binary dump (e.g., unexpected size).
 */
function apc_bin_load ($data, $flags = null) {}

/**
 * Load a binary dump from a file into the APC file/user cache
 * @link http://www.php.net/manual/en/function.apc-bin-loadfile.php
 * @param filename string <p>
 *      The file name containing the dump, likely from
 *      apc_bin_dumpfile.
 *     </p>
 * @param context resource[optional] <p>
 *      The files context.
 *     </p>
 * @param flags int[optional] <p>
 *      Either APC_BIN_VERIFY_CRC32, APC_BIN_VERIFY_MD5,
 *      or both.
 *     </p>
 * @return bool true on success, otherwise false Reasons it may return false include
 *   APC is not enabled, filename is an invalid file name or empty,
 *   filename can't be opened, the file dump can't be completed, or
 *   if the data is not a valid APC binary dump (e.g., unexpected
 *   size).
 */
function apc_bin_loadfile ($filename, $context = null, $flags = null) {}

/**
 * Updates an old value with a new value
 * @link http://www.php.net/manual/en/function.apc-cas.php
 * @param key string <p>
 *      The key of the value being updated.
 *     </p>
 * @param old int <p>
 *      The old value (the value currently stored).
 *     </p>
 * @param new int <p>
 *      The new value to update to.
 *     </p>
 * @return bool Returns true on success, false on failure.
 */
function apc_cas ($key, $old, $new) {}

/**
 * Decrease a stored number
 * @link http://www.php.net/manual/en/function.apc-dec.php
 * @param key string <p>
 *      The key of the value being decreased.
 *     </p>
 * @param step int[optional] <p>
 *      The step, or value to decrease.
 *     </p>
 * @param success bool[optional] <p>
 *      Optionally pass the success or fail boolean value to
 *      this referenced variable.
 *     </p>
 * @return int the current value of key's value on success,
 *   &return.falseforfailure;
 */
function apc_dec ($key, $step = null, &$success = null) {}

/**
 * Deletes files from the opcode cache
 * @link http://www.php.net/manual/en/function.apc-delete-file.php
 * @param keys mixed <p>
 *      The files to be deleted. Accepts a string,
 *      array of strings, or an APCIterator
 *      object.
 *     </p>
 * @return mixed Returns true on success, false on failure.
 *   Or if keys is an array, then
 *   an empty array is returned on success, or an array of failed files
 *   is returned.
 */
function apc_delete_file ($keys) {}

/**
 * Checks if APC key exists
 * @link http://www.php.net/manual/en/function.apc-exists.php
 * @param keys mixed <p>
 *      A string, or an array of strings, that
 *      contain keys.
 *     </p>
 * @return mixed true if the key exists, otherwise false Or if an
 *   array was passed to keys, then
 *   an array is returned that contains all existing keys, or an empty
 *   array if none exist.
 */
function apc_exists ($keys) {}

/**
 * Increase a stored number
 * @link http://www.php.net/manual/en/function.apc-inc.php
 * @param key string <p>
 *      The key of the value being increased.
 *     </p>
 * @param step int[optional] <p>
 *      The step, or value to increase.
 *     </p>
 * @param success bool[optional] <p>
 *      Optionally pass the success or fail boolean value to
 *      this referenced variable.
 *     </p>
 * @return int the current value of key's value on success,
 *   &return.falseforfailure;
 */
function apc_inc ($key, $step = null, &$success = null) {}

// End of apc v.
?>