Subversion Repositories SmartDukaan

Rev

Rev 20443 | Rev 20458 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20443 Rev 20456
Line 1733... Line 1733...
1733
        get_mongo_connection().Catalog.MasterData.update({'skuBundleId':data['skuBundleId']},{"$set":{'updatedOn':to_java_date(datetime.now())}},multi=True)
1733
        get_mongo_connection().Catalog.MasterData.update({'skuBundleId':data['skuBundleId']},{"$set":{'updatedOn':to_java_date(datetime.now())}},multi=True)
1734
        return {1:"Data updated successfully"}
1734
        return {1:"Data updated successfully"}
1735
    except:
1735
    except:
1736
        return {0:"Data not updated."}
1736
        return {0:"Data not updated."}
1737
 
1737
 
1738
def resetCache(cache_type, users):
1738
def resetCache(cache_type, keys):
1739
    if (cache_type == 'deals'):
1739
    if (cache_type == 'deals'):
1740
        for userId in users.split(','):
1740
        for userId in keys.split(','):
1741
                mc.delete(userId)
1741
                mc.delete(userId)
1742
                mc.delete(userId+'_acc')
1742
                mc.delete(userId+'_acc')
1743
        return {1:'Cache cleared.'}
1743
        return {1:'Cache cleared.'}
1744
    elif (cache_type == 'itemCashBack'):
1744
    elif (cache_type == 'itemCashBack'):
1745
        mc.delete('item_cash_back')
1745
        mc.delete('item_cash_back')