Added APC cache support back
A query class. Filtering will be added later.