Beispiel #1
0
def receive_user_after_update(mapper, conn, target):
    if target not in db.session.dirty:
        return

    to_delete = []

    prefix = target.generate_cache_prefix('ff')
    for key in ['username', 'email']:
        state = get_history(target, key)
        for value in state.deleted:
            to_delete.append('%s%s$%s' % (prefix, key, value))

    if to_delete:
        cache.delete_many(*to_delete)
Beispiel #2
0
def receive_user_after_update(mapper, conn, target):
    if target not in db.session.dirty:
        return

    to_delete = []

    prefix = target.generate_cache_prefix('ff')
    for key in ['username', 'email']:
        state = get_history(target, key)
        for value in state.deleted:
            to_delete.append('%s%s$%s' % (prefix, key, value))

    if to_delete:
        cache.delete_many(*to_delete)
Beispiel #3
0
 def receive_after_delete(mapper, conn, target):
     key = _unique_key(target, mapper.primary_key)
     cache.delete_many(key, target.generate_cache_prefix('count'))