Questions tagged [apcu]

APCu provides a user variable cache to PHP.

APCu uses the APC codebase to provide the user variable caching parts of APC.

APC was the de-facto cache for PHP, until Zend open sourced and donated their Zend Optimizer+ product, merged into PHP 5.5 as Opcache.

75 questions
3
votes
0 answers

APCU doesn't store in PHP 5.6

I'm using APCU for data caching. It was working fine until I've updated server. After updating I have those versions: Apache - 2.4.10 PHP - 5.6 APCU - 4.0.11 Now nothing is stored in cache. When I run php -r 'apcu_store("Test", "Test value");' it…
Ralfeus
  • 845
  • 9
  • 31
3
votes
1 answer

Small changes in code aren't taken into account with OPCache enabled

I've been using APC for Opcode optimization and data storage for few time until I read that OPCache is directly included in PHP since PHP5.5. Thus, I switched to OPCache + APCu. But small changes in code like adding a 'die(var_dump($some_var));' for…
Aleks Ben Maza
  • 327
  • 3
  • 12
3
votes
1 answer

APCu TTL not working php 7.0

By specifying the TTL, the item should be aged out of the cache. But it is not working. This is very very simple. the TTL is set to 1 second. Have I made a mistake? My version; PHP 7.0.12-1+deb.sury.org~xenial+1 (cli) ( NTS ) Copyright (c) 1997-2016…
Peter Prographo
  • 1,141
  • 1
  • 10
  • 27
3
votes
1 answer

Mac os X PHP56 ApcU via Brew - Symbol not found: _zend_signal_globals

When trying to install APCu via brew I get the error PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-apcu/apcu.so' - dlopen(/usr/local/opt/php56-apcu/apcu.so, 9): Symbol not found: _zend_signal_globals …
Jake N
  • 10,535
  • 11
  • 66
  • 112
3
votes
3 answers

Symfony 3 / APCu + PHP7

I have a problem with APCu and PHP7 again. Here is my conf. framework: validation: cache: validator.mapping.cache.doctrine.apc serializer: cache: serializer.mapping.cache.apc doctrine: orm: metadata_cache_driver:…
user3703456
3
votes
0 answers

PHP: Can APC / APCU cache Curl handles and share a connection?

Trying to find ways to speed up a REST connection and was curious if this is possible, or even necessary: Can APC / APCU cache Curl handles and share a connection?
Jon Roig
  • 171
  • 1
  • 1
  • 7
2
votes
1 answer

PHP APCu monotonic TTL clock change - please confirm my understanding of timestamps

We use PHP 7.4 and recently our build went from APCu version 5.1.21 to 5.1.22, with changelog noted here We noticed that the internal timestamps for the cache object have changed from a prior UNIX Timestamp value to some sort of low-value integer…
C C
  • 419
  • 1
  • 4
  • 18
2
votes
3 answers

Enable APCU CLI on docker php 7.3

I'm trying to enable apcu cli on my docker container in order to run my test. This is my docker file, I use : basic php image install composer install xdebug install more docker libs install apcu When I try to run my test inside this docker, it…
Alessandro Candon
  • 543
  • 2
  • 6
  • 21
2
votes
0 answers

Is there a simple way to cache DB results for CRUD purposes in PHP 7?

The other day, my boss asked me to find a way to increase the performance of PHP requests when it comes to searching/filtering/sorting with Datatables (Any CRUD would have the same issue, but in our case, we use Datatables a lot) He was trying to…
2
votes
0 answers

Installing APCU for PHP 7 on windows server 2016

i am using xampp 3.2.2 and i want to install Installing APCU for PHP 7 on windows server 2016 . i have tried a number of things and am still not getting any APC configuration information in my phpinfo page.
sam
  • 29
  • 1
  • 4
2
votes
1 answer

How to write into APCu from CLI-call?

I want to prefill my APCu-Cache with translation and there is already a job that does this called "SeedTranslationCacheJob". All jobs are only available in our "CRM" so a user that visits our website cannot start such jobs. I call this job on each…
Gizzmo
  • 691
  • 8
  • 21
2
votes
2 answers

Is apcu_fetch() lookup faster with prefix or suffix?

Scenario: - A small number of PHP projects (e.g. websites) using APCu. Each identified by a unique id / hash, which could be e.g. 20 characters long. We call this $site_hash below. - Each project stores a large number of small values stored in APCu,…
donquixote
  • 4,877
  • 3
  • 31
  • 54
2
votes
1 answer

Call to undefined function apc_clear_cache()

I am using Phalcon PHP framework with newly installed PHP 7.0 on Ubuntu 16.04. I also installed apcu and apcu_bc via pecl and I am getting 500 internal error with Apache logging this error: error: Uncaught Error: Call to undefined function…
Xoyce
  • 367
  • 6
  • 16
2
votes
1 answer

PHP apc/apcu cache do not keep intermediate result while shmop do, why?

I've encounter a problem with PHP to store intermediate result locally. With APC: apc_store("foo", "bar"); $ret = apc_fetch("foo"); With APCu: apcu_store("foo", "bar", 0); $ret = apcu_fetch("foo"); I store with apc_store/apcu_store under php_cli…
lulyon
  • 6,707
  • 7
  • 32
  • 49
1
vote
1 answer

PHP apcu not persistent in Laravel queued/dispatched jobs

(Laravel 8, PHP 8) Hi. I have a bunch of data in the PHP APC cache that I can access across my Laravel application with the apcu commands. I decided I should fire an async job to process some of that data for the user during a session and throw the…
Ebaldino
  • 11
  • 2