Skip to content

Cache Clean Problem? #274

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
jbcubed3 opened this issue May 1, 2016 · 17 comments
Closed

Cache Clean Problem? #274

jbcubed3 opened this issue May 1, 2016 · 17 comments

Comments

@jbcubed3
Copy link

jbcubed3 commented May 1, 2016

Hi,

Having a problem with the clearing the cache and reading cache stats.

Code looks like this:
require_once("/phpfastcache/phpfastcache.php");
$cache = phpFastCache();
$cache->clean();

I can remove an individual cache object just fine with $cache->delete(); but clean();
is failing for some reason. Caching does seem to work though, just can't seem to clean() anymore - despite it working previously.

$array = $cache->stats();
print_r($array);

This outputs:
Array ( [info] => Array ( [Total [bytes]] => 0 [Expired and removed [bytes]] => 0 [Current [bytes]] => 0 ) [size] => 0 [data] => Array ( ) )

Any ideas on how to resolve? Am really stuck on this one!

@Geolim4
Copy link
Member

Geolim4 commented May 1, 2016

Hi,

What kind of driver are you using ?

Regards,

Le 01/05/2016 à 13:11, jbcubed3 a écrit :

Hi,

Having a problem with the clearing the cache and reading cache stats.

Code looks like this:
require_once("/phpfastcache/phpfastcache.php");
$cache = phpFastCache();
$cache->clean();

I can remove an individual cache object just fine with
$cache->delete(); but clean();
is failing for some reason. Caching does seem to work though, just
can't seem to clean() anymore - despite it working previously.

$array = $cache->stats();
print_r($array);

This outputs:
Array ( [info] => Array ( [Total [bytes]] => 0 [Expired and removed
[bytes]] => 0 [Current [bytes]] => 0 ) [size] => 0 [data] => Array ( ) )

Any ideas on how to resolve? Am really stuck on this one!


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#274

@jbcubed3
Copy link
Author

jbcubed3 commented May 1, 2016

@Geolim4 - I'm using xampp on localhost at the moment, and phpfastcache set to auto

It's been working fine so far but today $cache->clean(); fails for some reason and not sure why!

@Geolim4
Copy link
Member

Geolim4 commented May 1, 2016

Can you debug your cache instance and tell me the kind of driver you are using ?

@jbcubed3
Copy link
Author

jbcubed3 commented May 1, 2016

@Geolim4 - unfortunately not sure how for both questions, can you please elaborate

@khoaofgod
Copy link
Member

@jbcubed3 can you try this with latest version and see if the problem still there.

@jbcubed3
Copy link
Author

jbcubed3 commented May 1, 2016

@khoaofgod - Hi - is there any other way to clear the cache?
I'm using this on localhost/XAMPP at the moment. I tried to use latest version, but getting some errors.

$cache->delete, $cache->get and $cache->set work perfectly, just that $cache->clean just doesn't clear the cache out anymore - but I haven't changed any settings.

How do I debug the cache instance?

@khoaofgod
Copy link
Member

I will commit a new example file by tonight and let you know for u can run that test file for clean();

@Geolim4
Copy link
Member

Geolim4 commented May 2, 2016

Use var_dump() or get_class() and tell us the driver used.
Le 1 mai 2016 23:54, "Khoa Bui" notifications@github.com a écrit :

I will commit a new example file by tonight and let you know for u can run
that test file for clean();


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#274 (comment)

@jbcubed3
Copy link
Author

jbcubed3 commented May 2, 2016

Hi @Geolim4 - this is what I get for var_dump():

object(phpfastcache_files)#1 (4) { ["tmp"]=> array(0) { } ["config"]=> array(9) { ["storage"]=> string(4) "auto" ["default_chmod"]=> int(511) ["htaccess"]=> bool(true) ["path"]=> string(0) "" ["securityKey"]=> string(4) "auto" ["memcache"]=> array(1) { [0]=> array(3) { [0]=> string(9) "127.0.0.1" [1]=> int(11211) [2]=> int(1) } } ["redis"]=> array(5) { ["host"]=> string(9) "127.0.0.1" ["port"]=> string(0) "" ["password"]=> string(0) "" ["database"]=> string(0) "" ["timeout"]=> string(0) "" } ["extensions"]=> array(0) { } ["fallback"]=> string(5) "files" } ["fallback"]=> bool(false) ["instant"]=> NULL }

@khoaofgod amazing thank you

@jbcubed3
Copy link
Author

jbcubed3 commented May 4, 2016

Hi @Geolim4 @khoaofgod - do you have any suggestions? Does the var_dump look okay?

@jbcubed3
Copy link
Author

Hi guys - any ideas?

@Geolim4
Copy link
Member

Geolim4 commented May 12, 2016

Does the target directory is writeable ?

@jbcubed3
Copy link
Author

Hi @Geolim4 - should be - I can read/write to the cache and create new objects - but I just can't clear it all for some reason!

@Geolim4
Copy link
Member

Geolim4 commented May 12, 2016

Weird, I can't reproduce it right now, I guess that you use Windows Env ?

@jbcubed3
Copy link
Author

Yep - using XAMPP for development/testing atm

@Geolim4
Copy link
Member

Geolim4 commented May 12, 2016

Do you have the possibility to test it on Lamp or even Map please (Linx/Mac) ?

@Geolim4
Copy link
Member

Geolim4 commented Jun 24, 2016

Fixed with #294 :)
We identified the bug in an other way.

@Geolim4 Geolim4 closed this as completed Jun 24, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants