changed: limit db cache to 500 queries
added: some stats logging/display