﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21170	Clearing DatabseCache doesn't work with Oracle backend.	mmmnow@…	nobody	"I have one row in my oracle cache table. I'm trying to clear it using standard django way:


{{{
from django.core.cache import cache
cache.clear()
}}}


But it doesn't work! The row is still in my cache table.

So I run python manage.py sell and put some code from DatabaseCache.clear() method:


{{{
from django.db import connections
table = connections['cache'].ops.quote_name('ws_cache_table')
cursor = connections['cache'].cursor()
cursor.execute('DELETE FROM %s' % table)
}}}


But it doesn't work either...

I don't get any exceptions thrown, my 'cache' connection is configured correctly in settings.py.

When I open SQL Developer and put


{{{
DELETE FROM ws_cache_table
}}}


Table gets truncated correctly.

On the other hand, when I add:


{{{
connections['cache'].commit()
}}}


I get exception django.db.transaction.TransactionManagementError: This code isn't under transaction management thrown but the table is truncated now."	Bug	closed	Core (Cache system)	1.6-beta-1	Normal	needsinfo		Shai Berger	Accepted	0	0	1	0	0	0
