[4303] Caching.
[4303] Caching. Fixed tests and caching method.
[4303] Caching. Improved cache function and tests.
Merge pull request #8 from lukkolstx/bug_4303

[4303] Caching.