Revert "Revert "Merge pull request #5 from anisimovt/cycleCacheFix""

This reverts commit 72dfb7987c823adc78fbea92ca67ea5d9c897976.