<div dir="ltr">Thanks Robert. I moved the line to clear the cache into my calling code and out of OSG. <div><br></div><div>I don't understand exactly what the cache does. If it has an expiration time and objects are removed after a minute or so (which seems to happen) it would appear it is a short-term cache, perhaps to increase efficiency when the model is loading, before it is rendered, such as re-using already loaded texture images and so forth. If it is for long-term caching (keeping models in memory even after another model is loaded) that would be counter productive in our application, since the user might load several different large model files in a minute in some situations, and keeping all those models in memory would be problematic. My preference would be to disable caching altogether, unless it is a short-term cache to make loading more efficient, in which case clearing the cache after the first render solves my problem.<div><br></div><div>I have set the osgDB::Options to CACHE_NONE but it does not appear to have any effect on caching. The OpenFlight model and its textures are always loaded from the cache if the cache contains objects.</div><div><br></div><div><div>osg::ref_ptr<osgDB::Options> dbOptions = new osgDB::Options();</div><div>dbOptions->setObjectCacheHint(osgDB::Options::CACHE_NONE);<br></div></div><div><br></div><div><span style="font-size: 9.5pt; font-family: Consolas; color: black;">osgDB::readNodeFile(</span><span style="font-size: 9.5pt; font-family: Consolas; color: gray;">fileName</span><span style="font-size: 9.5pt; font-family: Consolas; color: black;">, </span><span style="font-size: 9.5pt; font-family: Consolas; color: gray;">dbOptions</span><span style="font-size: 9.5pt; font-family: Consolas; color: black;">);</span><br></div><div><br></div><div>Is this not the correct way to disable caching?</div><div><br></div><div>Thanks.<br><br><br></div></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/de89e01e-20e4-461c-9b51-dc9dddecd09b%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/de89e01e-20e4-461c-9b51-dc9dddecd09b%40googlegroups.com</a>.<br />