Fix: check if entity cache enabled before using it
Merge pull request #43 from amikheychik/master

Fix: check if entity cache enabled before using it