Simple-PHP-Cache
Simple-PHP-Cache copied to clipboard
Cache stores only ONE value
When I call store(), only the first value is stored. It happens in a AWS instance, but not in my XAMPP.
I can clear the cache and write again a different data, but only the first one.
Any Idea?
Same problem here, good to see I'm not alone with this one.
May I see your code, while preparing data before store?
I use the cache system over some php files, each file creates a object of cache with a specific id
personal_id = 'asdBns8'; //something like this
$c = new Cache($personal_id);
In theory the system should use the same ".cache" file and work with the same cache over the different PHP files, whats the system does with one value in cache.
But when I try to store something like this, so a second value:
$c->store('user_data', $user_array);
$c->store('info', 'Data is submitted');
The complete content in the cache file gets deleted...
And the code before the storing, is nothing special, sometimes a simple MySQL Database Call, sometimes I try to store just a string, like the example above.
Oh wow, I think I fixed my problem...it was a problem with the charset, one php file was not converted to UTF8, what I need. Damn, sometimes it can be so easy...