Skip to content

Commit 86ce6d2

Browse files
committed
Methods for storing and getting from a hash
1 parent 1071d5f commit 86ce6d2

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/ServiceStack.Interfaces/Redis/Generic/IRedisTypedClient.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ public interface IRedisTypedClient<T>
7070
void FlushAll();
7171
T[] SearchKeys(string pattern);
7272
List<T> GetValues(List<string> keys);
73-
List<T> GetSortedEntryValues(IRedisSet<T> fromSet, int startingFrom, int endingAt);
73+
List<T> GetSortedEntryValues(IRedisSet<T> fromSet, int startingFrom, int endingAt);
74+
75+
void StoreAsHash(T entity);
76+
T GetFromHash(object id);
7477

7578
//Set operations
7679
HashSet<T> GetAllItemsFromSet(IRedisSet<T> fromSet);

src/ServiceStack.Interfaces/Redis/IRedisClient.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ public interface IRedisClient
5959
void RenameKey(string fromName, string toName);
6060
string GetSubstring(string key, int fromIndex, int toIndex);
6161

62+
//store POCOs as hash
63+
T GetFromHash<T>(object id);
64+
void StoreAsHash<T>(T entity);
65+
6266
bool ContainsKey(string key);
6367
bool RemoveEntry(params string[] args);
6468
long IncrementValue(string key);

0 commit comments

Comments
 (0)