[fs] Cleaned up cache code