Add caching for dynamic requests

The current code doesn't allow caching for dynamic requests (e.g. requests with pagination, filters, and so on). This behaviour occurs because of the caching key was generated only of the path info. The query string was ignored.

If the cache is invalidated and one browses a moment later to page 2 of a request for an example, or applies an filter to an collection, other visitors of the page would see this users settings for the rest of the cache lifetime.
Merge pull request #950 from tschreiner/master

Add caching for dynamic requests