#1 2014-08-20 12:49:57

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

How to completely disable caching?

Hi Arnaud,

WE can disable the caching at the dabble level using TSQLDatabase.UseCache, but how to do the same with TSQLRestServer?

Thanks.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#2 2014-08-20 12:59:53

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: How to completely disable caching?

See "5.5. ORM Cache", and especially "12.4. CRUD level cache" paragraphs of the SAD 1.18 pdf as reference.

By default, there is no caching at REST level.

Caching will then be enabled via calls to the following method, either globally for one TSQLRecord table, or for a set of ID in a given TSQLRecord table.

aRestInstance.Cache.SetCache(..)

Also note the following:

12.4.4. How to cache wrote:

Client.Cache.Clear is used to reset all cache settings (i.e. not only flush the cache content, but delete all settings previously made with Cache.SetCache() or Cache.SetTimeOut() calls.

I updated the documentation to make all this more explicit.
See http://synopse.info/fossil/info/34eb32169a

Offline

#3 2014-08-20 14:16:43

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: How to completely disable caching?

Great! It's obvious now smile


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

Board footer

Powered by FluxBB