 //Manage and cache reusable KatsanaSDK data including as travel, address, live share, image and vehicle activity. For most part, the framework manages all the caching and developer should not use and call methods in this class manually.
 @objcMembers
 public class CacheManager: NSObject {
-    public static let shared = CacheManager()
+    private static var _shared : CacheManager!
+    public static var shared: CacheManager {
+        get{
+            if _shared == nil{
+                _shared = CacheManager()
+            }
+            return _shared
+        }
+    }
     
     static public let dateFormatter : DateFormatter = {
         let formatter = DateFormatter()

                }
            }
        }

        let addressPath = cacheDirectory().appending("/" + cacheAddressDataFilename())
        url = URL(fileURLWithPath: addressPath)
        if let data = try? Data(contentsOf: url){
            if let unarchive = FastCoder.object(with: data) as? [Address]{
                self.addresses = unarchive
            }
        }
        
        let activitiesPath = cacheDirectory().appending("/" + cacheActivitiesDataFilename())
        url = URL(fileURLWithPath: activitiesPath)

        try? FileManager.default.removeItem(atPath: activityPath)
    }
    
    func clearMemory() {
        CacheManager._shared = nil
    }
    
    func purgeTravelOlderThan(days: Int) {
        let lastPurgeDate = UserDefaults.standard.value(forKey: "lastPurgeTravelDate")
        let purgeInterval : TimeInterval = 60*60*24*TimeInterval(days)
