redomino/redomino.tokenrole — pull request #5 by hman (2014-04-29 08:48:58+00:00)
Title: Fix for ZODB commit on view

Currently, line #47 creates a database transaction on view for any logged in Plone user as it writes a PersistentDict into the annotations, this is done on every view as the check "if not token_dict" also applies for an empty PersistentDict. This is of course sub-optimal as it can lead to large database sizes and slowdowns.

The patch solves this by not writing the PersistentDict. Instead, the setter functions create it if necessary.