Improved handling of primary cache
Fixed clearing of query-content