int osrfCacheInit( const char* serverStrings[], int size, time_t maxCacheSeconds ) {
if( !(serverStrings && size > 0) ) return -1;
+ osrfCacheCleanup(); /* in case we've already been init-ed */
int i;
_osrfCache = mc_new();
if(!child) return -1;
osrfLogDebug( OSRF_LOG_MARK, "Child init hook for child %d", child->pid);
+
+ osrfSystemInitCache();
char* resc = va_list_to_string("%s_drone",child->appname);
/* if we're a source-client, tell the logger now that we're a new process*/
#include <opensrf/osrf_prefork.h>
#include <signal.h>
-static int _osrfSystemInitCache( void );
static void report_child_status( pid_t pid, int status );
struct child_node;
typedef struct child_node ChildNode;
return osrfSystemBootstrapClientResc(config_file, contextnode, NULL);
}
-static int _osrfSystemInitCache( void ) {
+int osrfSystemInitCache( void ) {
jsonObject* cacheServers = osrf_settings_host_value_object("/cache/global/servers/server");
char* maxCache = osrf_settings_host_value("/cache/global/max_cache_time");
jsonObject* apps = osrf_settings_host_value_object("/activeapps/appname");
osrfStringArray* arr = osrfNewStringArray(8);
- _osrfSystemInitCache();
-
if(apps) {
int i = 0;