Index: /OpenSceneGraph/trunk/include/osg/NodeVisitor
===================================================================
--- /OpenSceneGraph/trunk/include/osg/NodeVisitor (revision 9464)
+++ /OpenSceneGraph/trunk/include/osg/NodeVisitor (revision 10174)
@@ -275,17 +275,17 @@
         {
         public:
-        
+
             DatabaseRequestHandler():
                 Referenced(true) {}
-        
-            virtual void requestNodeFile(const std::string& fileName,osg::Group* group, float priority, const FrameStamp* framestamp, osg::ref_ptr<osg::Referenced>& databaseRequest) = 0;
-            
+
+            virtual void requestNodeFile(const std::string& fileName,osg::Group* group, float priority, const FrameStamp* framestamp, osg::ref_ptr<osg::Referenced>& databaseRequest, const osg::Referenced* options=0) = 0;
+
         protected:
             virtual ~DatabaseRequestHandler() {}
         };
-        
+
         /** Set the handler for database requests.*/
         void setDatabaseRequestHandler(DatabaseRequestHandler* handler) { _databaseRequestHandler = handler; }
-        
+
         /** Get the handler for database requests.*/
         DatabaseRequestHandler* getDatabaseRequestHandler() { return _databaseRequestHandler.get(); }
Index: /OpenSceneGraph/trunk/include/osg/PagedLOD
===================================================================
--- /OpenSceneGraph/trunk/include/osg/PagedLOD (revision 8994)
+++ /OpenSceneGraph/trunk/include/osg/PagedLOD (revision 10174)
@@ -43,5 +43,14 @@
 
         virtual bool removeChildren(unsigned int pos,unsigned int numChildrenToRemove=1);
-        
+
+
+        /** Set the optional database osgDB::Options object to use when loaded children.*/
+        void setDatabaseOptions(osg::Referenced* options) { _databaseOptions = options; }
+
+        /** Get the optional database osgDB::Options object used when loaded children.*/
+        osg::Referenced* getDatabaseOptions() { return _databaseOptions.get(); }
+
+        /** Get the optional database osgDB::Options object used when loaded children.*/
+        const osg::Referenced* getDatabaseOptions() const { return _databaseOptions.get(); }
 
 
@@ -134,4 +143,5 @@
         void expandPerRangeDataTo(unsigned int pos);
 
+        ref_ptr<Referenced> _databaseOptions;
         std::string         _databasePath;
 
Index: /OpenSceneGraph/trunk/include/osgDB/DatabasePager
===================================================================
--- /OpenSceneGraph/trunk/include/osgDB/DatabasePager (revision 10171)
+++ /OpenSceneGraph/trunk/include/osgDB/DatabasePager (revision 10174)
@@ -66,10 +66,6 @@
         virtual void requestNodeFile(const std::string& fileName,osg::Group* group,
                                      float priority, const osg::FrameStamp* framestamp,
-                                     osg::ref_ptr<osg::Referenced>& databaseRequest);
-
-        virtual void requestNodeFile(const std::string& fileName,osg::Group* group,
-                                     float priority, const osg::FrameStamp* framestamp,
                                      osg::ref_ptr<osg::Referenced>& databaseRequest,
-                                     Options* loadOptions);
+                                     const osg::Referenced* options);
 
         /** Set the priority of the database pager thread(s).*/
Index: /OpenSceneGraph/trunk/include/osgDB/Options
===================================================================
--- /OpenSceneGraph/trunk/include/osgDB/Options (revision 10172)
+++ /OpenSceneGraph/trunk/include/osgDB/Options (revision 10174)
@@ -17,4 +17,5 @@
 #include <osgDB/AuthenticationMap>
 #include <osgDB/ReaderWriter>
+#include <osgDB/FileCache>
 
 #include <deque>
@@ -87,6 +88,25 @@
 };
 
+class OSGDB_EXPORT FileLocationCallback : public virtual osg::Referenced
+{
+    public:
+
+        enum Location
+        {
+            LOCAL_FILE,
+            REMOTE_FILE
+        };
+
+        virtual Location fileLocation(const std::string& filename, const Options* options) = 0;
+
+        virtual bool useFileCache() const = 0;
+
+    protected:
+        virtual ~FileLocationCallback() {}
+};
+
+
 /** Options base class used for passing options into plugins to control their operation.*/
-class Options : public osg::Object
+class OSGDB_EXPORT Options : public osg::Object
 {
     public:
@@ -234,9 +254,23 @@
 
 
-        /** Set the Registry callback to use in place of the default writeFile calls.*/
+        /** Set the callback to use in place of the default writeFile calls.*/
         void setWriteFileCallback( WriteFileCallback* cb) { _writeFileCallback = cb; }
 
         /** Get the const writeFile callback.*/
         WriteFileCallback* getWriteFileCallback() const { return _writeFileCallback.get(); }
+
+
+        /** Set the callback to use inform the DatabasePager whether a file is located on local or remote file system..*/
+        void setFileLocationCallback( FileLocationCallback* cb) { _fileLocationCallback = cb; }
+
+        /** Get the callback to use inform the DatabasePager whether a file is located on local or remote file system..*/
+        FileLocationCallback* getFileLocationCallback() const { return _fileLocationCallback.get(); }
+
+
+        /** Set the FileCache that is used to manage local storage of files downloaded from the internet.*/
+        void setFileCache(FileCache* fileCache) { _fileCache = fileCache; }
+
+        /** Get the FileCache that is used to manage local storage of files downloaded from the internet.*/
+        FileCache* getFileCache() const { return _fileCache.get(); }
 
 
@@ -259,4 +293,7 @@
         osg::ref_ptr<ReadFileCallback>      _readFileCallback;
         osg::ref_ptr<WriteFileCallback>     _writeFileCallback;
+        osg::ref_ptr<FileLocationCallback>  _fileLocationCallback;
+
+        osg::ref_ptr<FileCache>             _fileCache;
 };
 
Index: /OpenSceneGraph/trunk/include/osgDB/FileCache
===================================================================
--- /OpenSceneGraph/trunk/include/osgDB/FileCache (revision 10171)
+++ /OpenSceneGraph/trunk/include/osgDB/FileCache (revision 10174)
@@ -29,4 +29,6 @@
         const std::string& getFileCachePath() const { return _fileCachePath; }
 
+        virtual bool isFileAppropriateForFileCache(const std::string& originalFileName) const;
+
         virtual std::string createCacheFileName(const std::string& originalFileName) const;
 
Index: /OpenSceneGraph/trunk/include/osgDB/Registry
===================================================================
--- /OpenSceneGraph/trunk/include/osgDB/Registry (revision 10171)
+++ /OpenSceneGraph/trunk/include/osgDB/Registry (revision 10174)
@@ -165,4 +165,5 @@
         typedef class osgDB::ReadFileCallback ReadFileCallback;
         typedef class osgDB::WriteFileCallback WriteFileCallback;
+        typedef class osgDB::FileLocationCallback FileLocationCallback;
 
         /** Set the Registry callback to use in place of the default findFile calls.*/
@@ -327,4 +328,11 @@
         }
 
+        /** Set the callback to use inform the DatabasePager whether a file is located on local or remote file system..*/
+        void setFileLocationCallback( FileLocationCallback* cb) { _fileLocationCallback = cb; }
+
+        /** Get the callback to use inform the DatabasePager whether a file is located on local or remote file system..*/
+        FileLocationCallback* getFileLocationCallback() const { return _fileLocationCallback.get(); }
+
+
 
         /** Set whether the KdTrees should be built for geometry in the loader model. */
@@ -339,4 +347,5 @@
         /** Get the KdTreeBuilder visitor that is used to build KdTree on loaded models.*/
         osg::KdTreeBuilder* getKdTreeBuilder() { return _kdTreeBuilder.get(); }
+
 
         /** Set the FileCache that is used to manage local storage of files downloaded from the internet.*/
@@ -489,5 +498,5 @@
             therefore ensuring only one copy is ever constructed*/
         Registry();
-        
+
         /** get the attached library with specified name.*/
         DynamicLibraryList::iterator getLibraryItr(const std::string& fileName);
@@ -558,4 +567,5 @@
         osg::ref_ptr<ReadFileCallback>      _readFileCallback;
         osg::ref_ptr<WriteFileCallback>     _writeFileCallback;
+        osg::ref_ptr<FileLocationCallback>  _fileLocationCallback;
 
         DotOsgWrapperMap   _objectWrapperMap;
Index: /OpenSceneGraph/trunk/src/osg/PagedLOD.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osg/PagedLOD.cpp (revision 9387)
+++ /OpenSceneGraph/trunk/src/osg/PagedLOD.cpp (revision 10174)
@@ -59,4 +59,5 @@
 PagedLOD::PagedLOD(const PagedLOD& plod,const CopyOp& copyop):
     LOD(plod,copyop),
+    _databaseOptions(plod._databaseOptions),
     _databasePath(plod._databasePath),
     _frameNumberOfLastTraversal(plod._frameNumberOfLastTraversal),
@@ -214,13 +215,12 @@
                     if (_databasePath.empty())
                     {
-                        nv.getDatabaseRequestHandler()->requestNodeFile(_perRangeDataList[numChildren]._filename,this,priority,nv.getFrameStamp(), _perRangeDataList[numChildren]._databaseRequest);
+                        nv.getDatabaseRequestHandler()->requestNodeFile(_perRangeDataList[numChildren]._filename,this,priority,nv.getFrameStamp(), _perRangeDataList[numChildren]._databaseRequest, _databaseOptions.get());
                     }
                     else
                     {
                         // prepend the databasePath to the child's filename.
-                        nv.getDatabaseRequestHandler()->requestNodeFile(_databasePath+_perRangeDataList[numChildren]._filename,this,priority,nv.getFrameStamp(), _perRangeDataList[numChildren]._databaseRequest);
-                    }
-                }
-
+                        nv.getDatabaseRequestHandler()->requestNodeFile(_databasePath+_perRangeDataList[numChildren]._filename,this,priority,nv.getFrameStamp(), _perRangeDataList[numChildren]._databaseRequest, _databaseOptions.get());
+                    }
+                }
 
             }
Index: /OpenSceneGraph/trunk/src/osgDB/FileCache.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgDB/FileCache.cpp (revision 10171)
+++ /OpenSceneGraph/trunk/src/osgDB/FileCache.cpp (revision 10174)
@@ -29,4 +29,9 @@
 {
     osg::notify(osg::INFO)<<"Destructed FileCache "<<std::endl;
+}
+
+bool FileCache::isFileAppropriateForFileCache(const std::string& originalFileName) const
+{
+    return osgDB::containsServerAddress(originalFileName);
 }
 
Index: /OpenSceneGraph/trunk/src/osgDB/DatabasePager.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgDB/DatabasePager.cpp (revision 10171)
+++ /OpenSceneGraph/trunk/src/osgDB/DatabasePager.cpp (revision 10174)
@@ -446,7 +446,5 @@
             break;
     }
-    
-    //Getting CURL Environment Variables (If found rewrite OSG Options)
-    osg::ref_ptr<FileCache> fileCache = osgDB::Registry::instance()->getFileCache();
+
 
     do
@@ -482,7 +480,20 @@
 
         bool readFromFileCache = false;
-                
+
+        osg::ref_ptr<FileCache> fileCache = osgDB::Registry::instance()->getFileCache();
+        osg::ref_ptr<FileLocationCallback> fileLocationCallback = osgDB::Registry::instance()->getFileLocationCallback();
+
         if (databaseRequest.valid())
         {
+            if (databaseRequest->_loadOptions.valid())
+            {
+                if (databaseRequest->_loadOptions->getFileCache()) fileCache = databaseRequest->_loadOptions->getFileCache();
+                if (databaseRequest->_loadOptions->getFileLocationCallback()) fileLocationCallback = databaseRequest->_loadOptions->getFileLocationCallback();
+            }
+
+            // disable the FileCache if the fileLocationCallback tells us that it isn't required for this request.
+            if (fileLocationCallback.valid() && !fileLocationCallback->useFileCache()) fileCache = 0;
+
+
             // check if databaseRequest is still relevant
             if ((_pager->_frameNumber-databaseRequest->_frameNumberLastRequest)<=1)
@@ -493,8 +504,9 @@
                 {
                     case(HANDLE_ALL_REQUESTS):
+                    {
                         // do nothing as this thread can handle the load
-                        if (osgDB::containsServerAddress(databaseRequest->_fileName))
+                        if (fileCache.valid() && fileCache->isFileAppropriateForFileCache(databaseRequest->_fileName))
                         {
-                            if (fileCache.valid() && fileCache->existsInCache(databaseRequest->_fileName))
+                            if (fileCache->existsInCache(databaseRequest->_fileName))
                             {
                                 readFromFileCache = true;
@@ -502,8 +514,20 @@
                         }
                         break;
-                        
+                    }
                     case(HANDLE_NON_HTTP):
+                    {
                         // check the cache first
-                        if (osgDB::containsServerAddress(databaseRequest->_fileName))
+                        bool isHighLatencyFileRequest = false;
+
+                        if (fileLocationCallback.valid())
+                        {
+                            isHighLatencyFileRequest = fileLocationCallback->fileLocation(databaseRequest->_fileName, databaseRequest->_loadOptions.get()) == FileLocationCallback::REMOTE_FILE;
+                        }
+                        else  if (fileCache.valid() && fileCache->isFileAppropriateForFileCache(databaseRequest->_fileName))
+                        {
+                            isHighLatencyFileRequest = true;
+                        }
+
+                        if (isHighLatencyFileRequest)
                         {
                             if (fileCache.valid() && fileCache->existsInCache(databaseRequest->_fileName))
@@ -519,13 +543,10 @@
                         }
                         break;
-                        
+                    }
                     case(HANDLE_ONLY_HTTP):
-                        // make sure the request is a http request
-                        if (!osgDB::containsServerAddress(databaseRequest->_fileName))
-                        {
-                            osg::notify(osg::NOTICE)<<_name<<": Help we have request we shouldn't have "<<databaseRequest->_fileName<<std::endl;
-                            databaseRequest = 0;
-                        }
+                    {
+                        // accept all requests, as we'll assume only high latency requests will have got here.
                         break;
+                    }
                 }
             }
@@ -555,6 +576,6 @@
 
             if (databaseRequest->_loadedModel.valid() &&
-                osgDB::containsServerAddress(databaseRequest->_fileName) &&
                 fileCache.valid() &&
+                fileCache->isFileAppropriateForFileCache(databaseRequest->_fileName) &&
                 !readFromFileCache)
             {
@@ -1231,14 +1252,20 @@
 void DatabasePager::requestNodeFile(const std::string& fileName,osg::Group* group,
                                     float priority, const osg::FrameStamp* framestamp,
-                                    osg::ref_ptr<osg::Referenced>& databaseRequest)
-{
-    requestNodeFile(fileName,group,priority,framestamp,databaseRequest,Registry::instance()->getOptions());
-}
-
-void DatabasePager::requestNodeFile(const std::string& fileName,osg::Group* group,
-                                    float priority, const osg::FrameStamp* framestamp,
                                     osg::ref_ptr<osg::Referenced>& databaseRequestRef,
-                                    Options* loadOptions)
-{
+                                    const osg::Referenced* options)
+{
+    osgDB::Options* loadOptions = dynamic_cast<osgDB::Options*>(const_cast<osg::Referenced*>(options));
+    if (!loadOptions)
+    {
+       loadOptions = Registry::instance()->getOptions();
+
+        osg::notify(osg::NOTICE)<<"Using options from Registry "<<std::endl;
+    }
+    else
+    {
+        osg::notify(osg::NOTICE)<<"options from requestNodeFile "<<std::endl;
+    }
+
+
     if (!_acceptNewRequests) return;
     
Index: /OpenSceneGraph/trunk/src/osgDB/Options.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgDB/Options.cpp (revision 10172)
+++ /OpenSceneGraph/trunk/src/osgDB/Options.cpp (revision 10174)
@@ -109,3 +109,5 @@
     _findFileCallback(options._findFileCallback),
     _readFileCallback(options._readFileCallback),
-    _writeFileCallback(options._writeFileCallback) {}
+    _writeFileCallback(options._writeFileCallback),
+    _fileLocationCallback(options._fileLocationCallback),
+    _fileCache(options._fileCache) {}
Index: /OpenSceneGraph/trunk/src/osgWrappers/osg/PagedLOD.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgWrappers/osg/PagedLOD.cpp (revision 9775)
+++ /OpenSceneGraph/trunk/src/osgWrappers/osg/PagedLOD.cpp (revision 10174)
@@ -94,4 +94,19 @@
 	                      "Remove children from Group. ",
 	                      "Note, must be override by subclasses of Group which add per child attributes. ");
+	I_Method1(void, setDatabaseOptions, IN, osg::Referenced *, options,
+	          Properties::NON_VIRTUAL,
+	          __void__setDatabaseOptions__osg_Referenced_P1,
+	          "Set the optional database osgDB::Options object to use when loaded children. ",
+	          "");
+	I_Method0(osg::Referenced *, getDatabaseOptions,
+	          Properties::NON_VIRTUAL,
+	          __osg_Referenced_P1__getDatabaseOptions,
+	          "Get the optional database osgDB::Options object used when loaded children. ",
+	          "");
+	I_Method0(const osg::Referenced *, getDatabaseOptions,
+	          Properties::NON_VIRTUAL,
+	          __C5_osg_Referenced_P1__getDatabaseOptions,
+	          "Get the optional database osgDB::Options object used when loaded children. ",
+	          "");
 	I_Method1(void, setDatabasePath, IN, const std::string &, path,
 	          Properties::NON_VIRTUAL,
@@ -225,4 +240,7 @@
 	                   "",
 	                   "");
+	I_SimpleProperty(osg::Referenced *, DatabaseOptions, 
+	                 __osg_Referenced_P1__getDatabaseOptions, 
+	                 __void__setDatabaseOptions__osg_Referenced_P1);
 	I_SimpleProperty(const std::string &, DatabasePath, 
 	                 __C5_std_string_R1__getDatabasePath, 
Index: /OpenSceneGraph/trunk/src/osgWrappers/osg/NodeVisitor.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgWrappers/osg/NodeVisitor.cpp (revision 9461)
+++ /OpenSceneGraph/trunk/src/osgWrappers/osg/NodeVisitor.cpp (revision 10174)
@@ -420,9 +420,9 @@
 	               "",
 	               "");
-	I_Method5(void, requestNodeFile, IN, const std::string &, fileName, IN, osg::Group *, group, IN, float, priority, IN, const osg::FrameStamp *, framestamp, IN, osg::ref_ptr< osg::Referenced > &, databaseRequest,
-	          Properties::PURE_VIRTUAL,
-	          __void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_FrameStamp_P1__osg_ref_ptrT1_osg_Referenced__R1,
-	          "",
-	          "");
+	I_MethodWithDefaults6(void, requestNodeFile, IN, const std::string &, fileName, , IN, osg::Group *, group, , IN, float, priority, , IN, const osg::FrameStamp *, framestamp, , IN, osg::ref_ptr< osg::Referenced > &, databaseRequest, , IN, const osg::Referenced *, options, 0,
+	                      Properties::PURE_VIRTUAL,
+	                      __void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_FrameStamp_P1__osg_ref_ptrT1_osg_Referenced__R1__C5_osg_Referenced_P1,
+	                      "",
+	                      "");
 END_REFLECTOR
 
Index: /OpenSceneGraph/trunk/src/osgWrappers/osgDB/Registry.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgWrappers/osgDB/Registry.cpp (revision 10171)
+++ /OpenSceneGraph/trunk/src/osgWrappers/osgDB/Registry.cpp (revision 10174)
@@ -86,4 +86,6 @@
 TYPE_NAME_ALIAS(class osgDB::WriteFileCallback, osgDB::Registry::WriteFileCallback)
 
+TYPE_NAME_ALIAS(class osgDB::FileLocationCallback, osgDB::Registry::FileLocationCallback)
+
 BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
 	I_DeclaringFile("osgDB/Registry");
@@ -412,4 +414,14 @@
 	          __void___buildKdTreeIfRequired__ReaderWriter_ReadResult_R1__C5_Options_P1,
 	          "",
+	          "");
+	I_Method1(void, setFileLocationCallback, IN, osgDB::Registry::FileLocationCallback *, cb,
+	          Properties::NON_VIRTUAL,
+	          __void__setFileLocationCallback__FileLocationCallback_P1,
+	          "Set the callback to use inform the DatabasePager whether a file is located on local or remote file system. ",
+	          "");
+	I_Method0(osgDB::Registry::FileLocationCallback *, getFileLocationCallback,
+	          Properties::NON_VIRTUAL,
+	          __FileLocationCallback_P1__getFileLocationCallback,
+	          "Get the callback to use inform the DatabasePager whether a file is located on local or remote file system. ",
 	          "");
 	I_Method1(void, setBuildKdTreesHint, IN, osgDB::Options::BuildKdTreesHint, hint,
@@ -667,4 +679,7 @@
 	                 __FileCache_P1__getFileCache, 
 	                 __void__setFileCache__FileCache_P1);
+	I_SimpleProperty(osgDB::Registry::FileLocationCallback *, FileLocationCallback, 
+	                 __FileLocationCallback_P1__getFileLocationCallback, 
+	                 __void__setFileLocationCallback__FileLocationCallback_P1);
 	I_SimpleProperty(osgDB::Registry::FindFileCallback *, FindFileCallback, 
 	                 __FindFileCallback_P1__getFindFileCallback, 
Index: /OpenSceneGraph/trunk/src/osgWrappers/osgDB/DatabasePager.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgWrappers/osgDB/DatabasePager.cpp (revision 10171)
+++ /OpenSceneGraph/trunk/src/osgWrappers/osgDB/DatabasePager.cpp (revision 10174)
@@ -20,5 +20,4 @@
 #include <osg/State>
 #include <osgDB/DatabasePager>
-#include <osgDB/Options>
 
 // Must undefine IN and OUT macros defined in Windows headers
@@ -70,13 +69,8 @@
 	          "Create a shallow copy on the DatabasePager. ",
 	          "");
-	I_Method5(void, requestNodeFile, IN, const std::string &, fileName, IN, osg::Group *, group, IN, float, priority, IN, const osg::FrameStamp *, framestamp, IN, osg::ref_ptr< osg::Referenced > &, databaseRequest,
-	          Properties::VIRTUAL,
-	          __void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_osg_FrameStamp_P1__osg_ref_ptrT1_osg_Referenced__R1,
+	I_Method6(void, requestNodeFile, IN, const std::string &, fileName, IN, osg::Group *, group, IN, float, priority, IN, const osg::FrameStamp *, framestamp, IN, osg::ref_ptr< osg::Referenced > &, databaseRequest, IN, const osg::Referenced *, options,
+	          Properties::VIRTUAL,
+	          __void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_osg_FrameStamp_P1__osg_ref_ptrT1_osg_Referenced__R1__C5_osg_Referenced_P1,
 	          "Add a request to load a node file to end the the database request list. ",
-	          "");
-	I_Method6(void, requestNodeFile, IN, const std::string &, fileName, IN, osg::Group *, group, IN, float, priority, IN, const osg::FrameStamp *, framestamp, IN, osg::ref_ptr< osg::Referenced > &, databaseRequest, IN, osgDB::Options *, loadOptions,
-	          Properties::VIRTUAL,
-	          __void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_osg_FrameStamp_P1__osg_ref_ptrT1_osg_Referenced__R1__Options_P1,
-	          "",
 	          "");
 	I_Method1(int, setSchedulePriority, IN, OpenThreads::Thread::ThreadPriority, priority,
Index: /OpenSceneGraph/trunk/src/osgWrappers/osgDB/Options.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgWrappers/osgDB/Options.cpp (revision 10171)
+++ /OpenSceneGraph/trunk/src/osgWrappers/osgDB/Options.cpp (revision 10174)
@@ -18,4 +18,5 @@
 #include <osg/Shape>
 #include <osgDB/AuthenticationMap>
+#include <osgDB/FileCache>
 #include <osgDB/Options>
 #include <osgDB/ReaderWriter>
@@ -28,4 +29,28 @@
 #undef OUT
 #endif
+
+BEGIN_ENUM_REFLECTOR(osgDB::FileLocationCallback::Location)
+	I_DeclaringFile("osgDB/Options");
+	I_EnumLabel(osgDB::FileLocationCallback::LOCAL_FILE);
+	I_EnumLabel(osgDB::FileLocationCallback::REMOTE_FILE);
+END_REFLECTOR
+
+BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgDB::FileLocationCallback)
+	I_DeclaringFile("osgDB/Options");
+	I_VirtualBaseType(osg::Referenced);
+	I_Constructor0(____FileLocationCallback,
+	               "",
+	               "");
+	I_Method2(osgDB::FileLocationCallback::Location, fileLocation, IN, const std::string &, filename, IN, const osgDB::Options *, options,
+	          Properties::PURE_VIRTUAL,
+	          __Location__fileLocation__C5_std_string_R1__C5_Options_P1,
+	          "",
+	          "");
+	I_Method0(bool, useFileCache,
+	          Properties::PURE_VIRTUAL,
+	          __bool__useFileCache,
+	          "",
+	          "");
+END_REFLECTOR
 
 BEGIN_OBJECT_REFLECTOR(osgDB::FindFileCallback)
@@ -224,5 +249,5 @@
 	          Properties::NON_VIRTUAL,
 	          __void__setWriteFileCallback__WriteFileCallback_P1,
-	          "Set the Registry callback to use in place of the default writeFile calls. ",
+	          "Set the callback to use in place of the default writeFile calls. ",
 	          "");
 	I_Method0(osgDB::WriteFileCallback *, getWriteFileCallback,
@@ -230,4 +255,24 @@
 	          __WriteFileCallback_P1__getWriteFileCallback,
 	          "Get the const writeFile callback. ",
+	          "");
+	I_Method1(void, setFileLocationCallback, IN, osgDB::FileLocationCallback *, cb,
+	          Properties::NON_VIRTUAL,
+	          __void__setFileLocationCallback__FileLocationCallback_P1,
+	          "Set the callback to use inform the DatabasePager whether a file is located on local or remote file system. ",
+	          "");
+	I_Method0(osgDB::FileLocationCallback *, getFileLocationCallback,
+	          Properties::NON_VIRTUAL,
+	          __FileLocationCallback_P1__getFileLocationCallback,
+	          "Get the callback to use inform the DatabasePager whether a file is located on local or remote file system. ",
+	          "");
+	I_Method1(void, setFileCache, IN, osgDB::FileCache *, fileCache,
+	          Properties::NON_VIRTUAL,
+	          __void__setFileCache__FileCache_P1,
+	          "Set the FileCache that is used to manage local storage of files downloaded from the internet. ",
+	          "");
+	I_Method0(osgDB::FileCache *, getFileCache,
+	          Properties::NON_VIRTUAL,
+	          __FileCache_P1__getFileCache,
+	          "Get the FileCache that is used to manage local storage of files downloaded from the internet. ",
 	          "");
 	I_SimpleProperty(osgDB::AuthenticationMap *, AuthenticationMap, 
@@ -243,4 +288,10 @@
 	                 __FilePathList_R1__getDatabasePathList, 
 	                 0);
+	I_SimpleProperty(osgDB::FileCache *, FileCache, 
+	                 __FileCache_P1__getFileCache, 
+	                 __void__setFileCache__FileCache_P1);
+	I_SimpleProperty(osgDB::FileLocationCallback *, FileLocationCallback, 
+	                 __FileLocationCallback_P1__getFileLocationCallback, 
+	                 __void__setFileLocationCallback__FileLocationCallback_P1);
 	I_SimpleProperty(osgDB::FindFileCallback *, FindFileCallback, 
 	                 __FindFileCallback_P1__getFindFileCallback, 
Index: /OpenSceneGraph/trunk/CMakeLists.txt
===================================================================
--- /OpenSceneGraph/trunk/CMakeLists.txt (revision 10165)
+++ /OpenSceneGraph/trunk/CMakeLists.txt (revision 10174)
@@ -31,6 +31,6 @@
 SET(OPENSCENEGRAPH_MAJOR_VERSION 2)
 SET(OPENSCENEGRAPH_MINOR_VERSION 9)
-SET(OPENSCENEGRAPH_PATCH_VERSION 4)
-SET(OPENSCENEGRAPH_SOVERSION 59)
+SET(OPENSCENEGRAPH_PATCH_VERSION 5)
+SET(OPENSCENEGRAPH_SOVERSION 60)
 
 # set to 0 when not a release candidate, non zero means that any generated 
