Fixed two problems with caching of db results
Fixed two problems with caching of db results

First, the cache wasn't used because some wrong variables were used.

Second, the cache wasn't beign emptied upon a flush, which it now is.

JasperHorn/GoodSuite