more elegant method to use cache

git-svn-id: https://svn.code.sf.net/p/moneymanagerex/code/trunk@6366 7f5d68d0-c712-0410-839f-9b116a576cc5