def clear(self, delete_thumbnails=False):
prefix = settings.THUMBNAIL_KEY_PREFIX<EOL>for key in self._find_keys_raw(prefix):<EOL><INDENT>self.cache.delete(key)<EOL><DEDENT>KVStoreModel.objects.filter(key__startswith=prefix).delete()<EOL>if delete_thumbnails:<EOL><INDENT>self.delete_all_thumbnail_files()<EOL><DEDENT>
We can clear the database more efficiently using the prefix here rather
than calling :meth:`_delete_raw`.