I’m looking for the fastest in-memory cache/hashtable available for PHP.
I will be storing some system-configuration values in it and I’m trying to get the least possible overhead.
The data will be small and granular.
What would you recommend and why?
Advertisement
Answer
If you dont have APC or Memcached installed already (or dont want to use them for this) you can also create a RAM disk. Then use file_get_contents()
and file_put_contents()
where filename is your key and the file content is your value. I dont have numbers for that, but it should be fast.