public void Set(object model, string fullKey = null, CacheOptions options = null) { if (fullKey == null) { fullKey = ModelKey(model); } this[fullKey, options] = model.ToJson(); }
public string this[string key, CacheOptions options = null] { get { if (OperationalStatus != EOperationalStatus.Operational) { return(null); } try { return(GetNative(key)); } catch (Exception e) { Current.Log.Add(e); return(null); } } set { if (OperationalStatus != EOperationalStatus.Operational) { return; } try { if (value != null) { SetNative(key, value, options); } else if (Contains(key)) { Remove(key); } } catch (Exception e) { Current.Log.Add(e); } } }
public abstract void SetNative(string key, string serializedModel, CacheOptions options = null);