Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

How to manually change the local cache path (without deleting data already in it?)
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=65&t=57273
Page 1 of 1

Author:  Nebilar [ Thu 20 Feb, 2020, 17:30 ]
Post subject:  How to manually change the local cache path (without deleting data already in it?)

I have downloaded tickdata from dukascopy and want to access it from within the jforex api.
The only way I know how to do this would be with IClients setCacheDirectory().

The problem is that once I set the directory to my directory containing the tick data, all data was deleted. How can I prevent jforex from deleting all my downloaded dukascopy tick data? And still use it with jforex?

Thanks

Author:  vadim_berezhnoj [ Fri 28 Feb, 2020, 11:48 ]
Post subject:  Re: How to manually change the local cache path (without deleting data already in it?)

Hello.

IClient interface:

/**
* Sets the location of the cache files. Default is <code>System.getProperty("java.io.tmpdir") + "/.cache"</code>
* <p> The method should get called <u>before</u> the call of {@link #connect(String, String, String)}.
* <p>WARNING: JForex might delete all folder's content if folder already existed AND was not created by this method call.
*
* @param cacheDirectory directory where cache files should be saved
*/
void setCacheDirectory(File cacheDirectory);

Looks like expected behavior - cache folder must be filled by JForex classes, which are really know necessary folders structure and files format.

Kind regards, Support Team.

  Page 1 of 1