Add caching

Signed-off-by: Siarhei Krukau <siarhei.krukau@gmail.com>