PhpFastCache is a PHP based high-performance, distributed object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
Questions tagged [phpfastcache]
23 questions
5
votes
1 answer
fetch returns only one row when i get it from cache
I'm trying to adopt a cache class to use on my web page.
Simple logic is like that:
Try to get data from cache:
If there is not: run query and set this as a cache.
If there is: show data from cache.
my code

LetsSeo
- 875
- 7
- 20
4
votes
2 answers
Adding tags to cache entry takes a long time using PhpFastCache with Memcached driver
Here is the code:
public static function applyInvalidationTags(ExtendedCacheItemInterface $cacheItem, $values): void
{
$isSomething = false;
$tags = [];
foreach ($values[0] as $value) {
$tags[] =…

Mosset Jérémie
- 310
- 1
- 4
- 20
2
votes
0 answers
PHPfastcache does not expire after timeout
I use phpfastcache with these settings:
phpFastCache::setup("storage","auto");
phpFastCache::setup("path", '/path/to/some/dir');
The auto setting results in the use of the files driver.
Whenever I call set with a timeout the key I set does not…

Koen Peters
- 12,798
- 6
- 36
- 59
1
vote
1 answer
How to implement caching of responses from API's( built with PHP)?
I want to cache the API responses so that number of requests to the API server are reduced. API's are written in PHP using zend framework.
My approach: I created a redis cluster and I used phpfastcache to connect to redis cluster. Using…

akshayghatiki
- 21
- 3
1
vote
0 answers
How to determine appropriate max_user_connections in MySQL?
I've had a couple of max_user_connections over the last few weeks. My old value was set to 50 and I could get upwards of 100+ errors per day.
My new value is 100 and this has reduced to 0-5 per day.
I'm trying to find the sweet spot but unable to…

GenesisBits
- 364
- 2
- 23
1
vote
1 answer
Is it worth caching WordPress specific Queries?
I have multiple wordpress specific queries firing when a user visits my homepage. I could have 150+ users visit concurrently with maybe 25+ of them hitting the homepage.
Here is an example of one query:
$args = array(
'posts_per_page' =>…

GenesisBits
- 364
- 2
- 23
1
vote
1 answer
phpfastcache cant load driver for Memcache
I'm trying to implement memcached for my php project and my code never gets past the CacheManager::getInstance() call because the phpFastCache is bombing on instantiating the right driver for the cache. the exact line it is failing on is:
return…

radamnyc
- 157
- 1
- 11
1
vote
3 answers
Include PHP file with condition opened but closed in another included PHP file
I would like to include at the beginning of my script a PHP file that open a IF condition. Then i write my script, and to finish I include another PHP file that close the conditon.
This bring me to a "Parse error: syntax error, unexpected end of…

TooLiPHoNe.NeT
- 479
- 1
- 5
- 22
1
vote
1 answer
How to clear phpFastCache when path set to /tmp/
I'm using phpFastCache in a frontend-application, setting the path to the server's "/tmp/" directory:
phpFastCache::setup('path',"/tmp/");
I do not want to use phpFastCache's automatically found cache-directory, because it clutters my home directory…

Dirk Seifert
- 161
- 1
- 6
1
vote
0 answers
Memcached using way too much memory
free -m
total used free shared buffers cached
Mem: 24028 23636 392 0 345 8104
-/+ buffers/cache: 15186 8842
Swap: 2015 852 1163
USER …

Yk666
- 29
- 3
1
vote
1 answer
using phpfastcache file cache system
I have a question regarding phpfastcache that i hope someone can answer and explain to me. phpfastcache claim that it can serv 10,000+ visitors, but what is the limit it can serv if there is any? let me give you a example so you can answer me based…

user1341993
- 253
- 2
- 5
- 14
0
votes
1 answer
Phpfastcache 6.1.4: Redis is not installed or is misconfigured
phpfastcache v6.1.4 and redis is up running on default port 6379 through Kubernetes.
PHP Fatal error: Uncaught phpFastCache\Exceptions\phpFastCacheDriverCheckException: Redis is not installed or is misconfigured, cannot continue.
Also, please…

user3552178
- 2,719
- 8
- 40
- 67
0
votes
1 answer
Would file system caching using the same amount of storage space as memory caching?
I'm thinking of replacing some of my file system caching (via phpfastcache) over to memcache (again using phpfastcache) but I have a query on storage sizes. Potentially a silly question but:
If I had 80gb of file cache storage being used would that…

GenesisBits
- 364
- 2
- 23
0
votes
2 answers
connection refuse with redis and phpfastcache
I am trying to set a connection to redis using phpfastcache but I keep getting connection refuse
Here is my simple code:
$defaultDriver = 'Redis';
$Psr16Adapter = new Psr16Adapter($defaultDriver);
…

shape
- 95
- 2
- 6
0
votes
1 answer
Testing a 304 response code implementation in PHP
I have an API and I've been trying to add cache control headers to it.
The API already makes use of PhpFastCache for server side caching but I wanted to add an additional layer of browser control caching. I came across this intelligent php cache…

GenesisBits
- 364
- 2
- 23