Allura/allura/model/repository.py
def expire_new_instances(self, cls):
        '''
        Expire any instances that were "new" or had no _id value.

        If a lot of new instances of a class are being created, it's possible
        for a query to pull a copy from mongo when a copy keyed by the synthetic
        ID is still in the cache, potentially causing de-sync between the copies
        leading to one with missing data overwriting the other.  Clear new
        instances out of the cache relatively frequently (depending on the query
        and instance cache sizes) to avoid this.
        '''
        for _query in self._synthetic_id_queries[cls]:
            self._query_cache[cls].pop(_query)
        self._synthetic_id_queries[cls] = set()
        for _id in self._synthetic_ids[cls]:
            instance = self._instance_cache[cls].pop(_id)
            self._try_flush(instance, expunge=True)
        self._synthetic_ids[cls] = set()

        Expire any instances that were "new" or had no _id value.

        If a lot of new instances of a class are being created, it's possible
        for a query to pull a copy from mongo when a copy keyed by the synthetic
        ID is still in the cache, potentially causing de-sync between the copies
        leading to one with missing data overwriting the other.  Clear new
        instances out of the cache relatively frequently (depending on the query
        and instance cache sizes) to avoid this.
        
Expire any instances that were "new" or had no _id value.
If a lot of new instances of a class are being created, it's possible
for a query to pull a copy from mongo when a copy keyed by the synthetic
ID is still in the cache, potentially causing de-sync between the copies
leading to one with missing data overwriting the other.  Clear new
instances out of the cache relatively frequently (depending on the query
and instance cache sizes) to avoid this.
Expire any instances that were " new " or had no _id value . If a lot of new instances of a class are being created it ' s possible for a query to pull a copy from mongo when a copy keyed by the synthetic ID is still in the cache potentially causing de - sync between the copies leading to one with missing data overwriting the other . Clear new instances out of the cache relatively frequently ( depending on the query and instance cache sizes ) to avoid this .
def expire_new_instances(self, cls):
        for _query in self._synthetic_id_queries[cls]:
            self._query_cache[cls].pop(_query)
        self._synthetic_id_queries[cls] = set()
        for _id in self._synthetic_ids[cls]:
            instance = self._instance_cache[cls].pop(_id)
            self._try_flush(instance, expunge=True)
        self._synthetic_ids[cls] = set()
def expire_new_instances ( self , cls ) : for _query in self . _synthetic_id_queries [ cls ] : self . _query_cache [ cls ] . pop ( _query ) self . _synthetic_id_queries [ cls ] = set ( ) for _id in self . _synthetic_ids [ cls ] : instance = self . _instance_cache [ cls ] . pop ( _id ) self . _try_flush ( instance , expunge = True ) self . _synthetic_ids [ cls ] = set ( )
Expire any instances that were "new" or had no _id value.
Expire any instances that were " new " or had no _id value .
'''
        Expire any instances that were "new" or had no _id value.

        If a lot of new instances of a class are being created, it's possible
        for a query to pull a copy from mongo when a copy keyed by the synthetic
        ID is still in the cache, potentially causing de-sync between the copies
        leading to one with missing data overwriting the other.  Clear new
        instances out of the cache relatively frequently (depending on the query
        and instance cache sizes) to avoid this.
        '''
self
cls