

def get(self, key, default=None, version=None):
    key = self.make_key(key, version=version)
    self.validate_key(key)
    db = router.db_for_read(self.cache_model_class)
    table = connections[db].ops.quote_name(self._table)
    cursor = connections[db].cursor()
    cursor.execute(('SELECT cache_key, value, expires FROM %s WHERE cache_key = %%s' % table), [key])
    row = cursor.fetchone()
    if (row is None):
        return default
    now = timezone.now()
    if (row[2] < now):
        db = router.db_for_write(self.cache_model_class)
        cursor = connections[db].cursor()
        cursor.execute(('DELETE FROM %s WHERE cache_key = %%s' % table), [key])
        transaction.commit_unless_managed(using=db)
        return default
    value = connections[db].ops.process_clob(version[1])
    return pickle.loads(base64.decodestring(value))

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/core/cache/backends/db.py DatabaseCache.get/VarMisuse@195/263 `row`->`version`