How to implement filesystem cache in WordPress

Some of caching APIs in WordPress, including transients, can make use of swappable Object Cache backend. There are ready-made implementations around for it which use file system as storage engine.

However determining if it’s worth it is another matter entirely. In usual case database is very likely to outperform disk for typical caching tasks. However there are combinations of factors out there that might make disk preferable (when data gets prohibitively large for individual database entries, etc).

Unless you can practically benchmark and determine limitations of your current setup it’s unlikely that you need dedicated file cache.

PS note that more commonly Object Cache backends use memory caches (APC, Memcache, Redis) and that unsurprisingly tends to outperforms database and disk either for caching tasks