Clearing the Cache doesn't work
Posted: Sun 01 Dec 2013 16:35
Hey
I use your latest components for mySQL and LinqConnect
On Client side I have a query, which is fired quite a lot. So I hold it in Memory.
When I make changes to this list, I have a small function, which should fire the query to the database again.
But it Looks, like the Query Cache isn't cleared. - Because the result is not the one from the db, it is the one from the Memory.
My code Looks something like this:
I step through the code and see, that "myLocatedObject" has the true value. - So, the Cache.Clear is fired. - But I still get the result from the Memory, - The Select Query runs not against the db.
Please give me advise to this.
THX
I use your latest components for mySQL and LinqConnect
On Client side I have a query, which is fired quite a lot. So I hold it in Memory.
When I make changes to this list, I have a small function, which should fire the query to the database again.
But it Looks, like the Query Cache isn't cleared. - Because the result is not the one from the db, it is the one from the Memory.
My code Looks something like this:
Code: Select all
If myLocatedObject.HasToBeUpdated = True Then
Dim nCache = Devart.Data.Linq.CompiledQueryCache.GetCache(GetProvider.GetType)
nCache.Clear()
_Firmendaten = From Query In GetProvider.Firmendatens Select Query
End If
Return _Firmendaten
Please give me advise to this.
THX