update the logical of PYGlobalDataCache to modify sqlite thread-safe flag