#177 Improvement of cache
(cherry picked from commit 06930d5)