Caching

Caching can most improve speed at creating output files in one time. Cache is controled over oXFRX Object.

Caching is disable in default state.

Caching is available from XFRX 24.1


Cache type are: Report meta data, Font data and Images data.

Report meta data

After processing report XFRX don't clear report meta data, but save they to cache.  Report meta data cache is controled by SetReportCache() method.

Font data

After finalize output file XFRX don't clear font data, but save they to cache. Font data cache is controled by SetFDCache() method.

Images data

After finalize output file XFRX don't clear image data, but save they to cache. Images data cache is controled by SetImagesCache() method.

Global and local cache

Cache can be global (on oXFRX Object) or local (on instance of XFRX#INIT or PDFL#INIT) and is controled by SetGlobalCache() method.

Example of enabling cache

LOCAL m.loSession, m.lnRetVal, m.lcFile

USE Customers

m.loSession=EVALUATE([xfrx("XFRX#INIT")])

* Enable global cache
_Screen.oXFRX.SetGlobalCache(.T.)

* Enable report metadata cache
_Screen.oXFRX.SetUseReportCache(.T., .T.)

* Enable font data cache
_Screen.oXFRX.SetFDCache(.T.)

* Enable images data cache
_Screen.oXFRX.SetImagesCache(.T.)

SELECT Customers
SCAN ALL
     m.lcFile="Customer_"+LTRIM(STR(CustNo, 11))+".pdf"
     m.lnRetVal = m.loSession.SetParams(m.lcFile, , , , , , "PDF")
     IF m.lnRetVal = 0
        m.loSession.ProcessReport("report1", , , "NEXT 1")
        m.loSession.ProcessReport("report2", , , "NEXT 1") 
        m.loSession.finalize()
     ELSE
       ? m.lnRetVal, m.loSession.ErrorMessage(m.lnRetVal)
     ENDIF
ENDSCAN

RELEASE m.loSession