more stable
Add directory cache experimentally.