23 questions
0
votes
1
answer
586
views
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 ...
0
votes
1
answer
119
views
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 ...
1
vote
1
answer
2k
views
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 ...
4
votes
2
answers
538
views
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 ($...
1
vote
0
answers
110
views
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.
...
0
votes
2
answers
732
views
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($...
0
votes
1
answer
586
views
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 ...
0
votes
0
answers
476
views
Best place to create a cache folder in a Laravel 5.1 environment for third party libraries to write
I am facing the following issue in the production server (not in local or dev):
production.ERROR: phpFastCache\Exceptions\phpFastCacheDriverException: PLEASE CREATE OR CHMOD /var/www/curator5/...
1
vote
1
answer
222
views
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 ...
0
votes
1
answer
510
views
phpfastcache V6 + redis - possible to set prefix?
When I talk to redis directly I can use Redis::OPT_PREFIX to ensure i'm not overwriting keys. e.g. namespacing ..
$redis = new Redis();
if ($redis->connect('127.0.0.1', 6379)) {
$...
0
votes
1
answer
2k
views
How to cache a query with phpFastCache without Composer?
I am trying to use phpFastCache for all caching needs but I really don't understand how to use it. I understand their are examples and yes I have tried them and they are successful but it's not ...
0
votes
3
answers
886
views
Missing cache items [via phpfastcache] using Server Side Events
I'm using Server-Sent Events, to print messages for user.
In infinite loop, every 10 seconds I check if there is any new item in cache to broadcast:
$messages_to_broadcast = $this->_cache->...
0
votes
1
answer
225
views
Redis driver with phpfastcache bundle
I am going to use phpfastcache-bundle with symfony3. I have found a documentation how to use it with file driver. But docs are poor on other drivers. How can I setup a redis driver with symfony?
0
votes
2
answers
295
views
Switching off subdomains in phpfastcache
I'm using phpfastcache with files strategy. I'm caching sql queries.
As I see phpfastcache creates folders with subdomain name (ex. www.domain.pl).
I have admin panel in admin.domain.pl which calls ...
1
vote
1
answer
887
views
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 ...
0
votes
1
answer
2k
views
Setting memcached host/port in PHPFastCache
I'm currently able to use Memcached proper using the Memcached class. Setting the port for Memcached seems to work like this;
$mem = new memcached();
$mem->addServer("127.0.0.1", 3333);
The ...
0
votes
1
answer
428
views
phpfastcache for caching dataset
I have a web application built using PHP and MySQL. Now the database is hitting the red line due to the load. I am trying to use phpfastcache to store set of data into redis and reduce the load on the ...
1
vote
3
answers
737
views
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 ...
5
votes
1
answer
213
views
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.
...
2
votes
1
answer
2k
views
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 ...
1
vote
0
answers
823
views
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
...
1
vote
1
answer
828
views
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 ...
2
votes
0
answers
741
views
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 ...