Using django cache instead of local memory to store permissions.

This resolves issue #170 by using django cache. This makes sure that we're either using the cache that a developer desires or no cache at all in case they configure it that way.