public RetrieveFromREDISResponse RetrieveOject(byte[] token, string key) { RetrieveFromREDISResponse res = new RetrieveFromREDISResponse(); Session currentSession; if (SessionStore.TryGetValidSession(token, out currentSession)) { Exception error = null; try { res.SerializedObject = REDISConnector.REDISConnector.GetValue(key); } catch (Exception exp) { error = exp; } QueryExecution.SuccessResponse(res, error); } else { QueryExecution.SecurityFailureResponse(res); } return(res); }
public SimpleRacoonResponse InsertObject(byte[] token, string key, string value) { SimpleRacoonResponse res = new SimpleRacoonResponse(); Session currentSession; if (SessionStore.TryGetValidSession(token, out currentSession)) { Exception error = null; try { REDISConnector.REDISConnector.SetValue(key, value); } catch (Exception exp) { error = exp; } QueryExecution.SuccessResponse(res, error); } else { QueryExecution.SecurityFailureResponse(res); } return(res); }