Caching

classic Classic list List threaded Threaded
3 messages Options
nebsar nebsar
Reply | Threaded
Open this post in threaded view
|

Caching

Hello;

I need help about caching. I tried to setup caching path with code. But I think I could not manage it. Beacuse I do not see any cached files in my root path which is "D:/osgEarth". The code I tried is:

        osgEarth::Drivers::FileSystemCacheOptions osgEarthCacheOptions;
        osgEarthCacheOptions.rootPath()= "D:/osgEarth";
        osgEarth::Registry::instance()->setDefaultCache(osgEarth::CacheFactory::create(osgEarthCacheOptions));
        osgEarth::Registry::instance()->setDefaultCachePolicy(osgEarth::CachePolicy::USAGE_READ_WRITE);
       
        Cache* mapCache = CacheFactory::create(osgEarthCacheOptions);
        mapNode->getMap()->setCache(mapCache);

What should I do? Thanks.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Caching

nesbar,
Make sure you configure a cache before adding any layers to the map.
Glenn Waldron / Pelican Mapping
nebsar nebsar
Reply | Threaded
Open this post in threaded view
|

Re: Caching

Thanks Glenn. Now it works.

Nebi.