Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zend_Cache_Backend_Sqlite vs Zend_Cache_Backend_File

Currently i'm using Zend_Cache_Backend_File for caching my project (especially responses from external web services). I was wandering if I could find some benefit in migrating the structure to Zend_Cache_Backend_Sqlite.

Possible advantages are:

  • File system is well-ordered (only 1 file in cache folder)
  • Removing expired entries should be quicker (my assumption, since zend wouldn't need to scan internal-metadatas for expiring date of each cache)

Possible disadvantages:

  • Finding record to read (with files zend check if file exists based on filename and should be a bit quicker) in term of speed.

I've tried to search a bit in internet but it seems that there are not a lot of discussion about the matter.

What do you think about it?

Thanks in advance.

like image 757
Alekc Avatar asked Jun 08 '10 08:06

Alekc


1 Answers

I'd say, it depends on your application.

Switch shouldn't be hard. Just test both cases, and see which is the best for you. No benchmark is objective except your own.

Measuring just performance, Zend_Cache_Backend_Static is the fastest one.

like image 158
takeshin Avatar answered Nov 15 '22 08:11

takeshin