The latest svn version have QueryCache disabled by default, but QueryCache
(currently broken) is just a cache of SQL selects, not of results.

Actually I've found no result cache at all.
AFAIK, no query result cache exists, just an ObjectTracker (DataContext
scoped) which allow you to get the same instance from when you query the
database for the same row/entity...

If you disable ObjectTracker, there would be no way to use deferred loading:
since LoadWith (eager loading) does not work now, each time you retrieve an
entity you will have all the EntityRef/EntitySet based properties returning
null.


BTW, I'm not sure to have understand the problem you are talking about when
saing

A difficulty I have had with DbLinq is the fact that it also acts like
> an ORM and caches queries in an attempt to optimise database access.
> In my case I need the database to be updated and queried immediately
> on every call and don't want any caching within DbLinq.
>
>
I've not seen such optimisation in the code (a part from QueryCache), so
what do you mean with this?

If you call DataContext.SubmitChanges() after each operation (and disable
ObjectTracking), you'll have the database always in sync with the in memory
one.



Giacomo


On Fri, Jun 5, 2009 at 6:42 AM, <[email protected]> wrote:

>
> DBLinq is a huge timesaver for me to allow cross database SQL. It's
> fantastic that the library has been written and many thanks to the
> authors.
>
> The usage model I have for the library is to abstract away the backend
> SQL database and allow me to use LINQ for all my queries. Prior to
> DbLinq I would have different SQL statements for MySQL and Postgresql
> now I don't have any SQL at all! I's not that I mind writing SQL it's
> just that maintenance is such a pain when columns change, new tables
> get added etc.
>
> A difficulty I have had with DbLinq is the fact that it also acts like
> an ORM and caches queries in an attempt to optimise database access.
> In my case I need the database to be updated and queried immediately
> on every call and don't want any caching within DbLinq. I tried
> setting ObjectTrackingEnabled on my DataContext to false but that
> created problems.
>
> My solution was to put the code in for the ExecuteDynamicDelete,
> ExecuteDynamicInsert and ExecuteDynamicUpdate in DataContext.cs and
> call those for all database operations. In addtion I disabled the
> QueryCache in DbLinq\Data\Linq\Sugar\Implementation\QueryBuilder.cs.
> While that all works for me I was wondering if there is a "proper" way
> to turn off the DbLinq caching so I don't end up fighting the library
> everytime I do an svn update?
>
> Thanks,
>
> Aaron
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to