public async Task <List <Post> > FindUserPostStringAsync(string key) { var newKey = $"user_post: {key}"; var result = await this._redisDbContext.StringGetAsync(newKey, CommandFlags.None); return(result.HasValue ? SerializeDeserialize.Deserialize <List <Post> >(result) : null); }
/*public async Task<Post> FindPostAsync(string key) * { * var result = await this._redisDbContext.HashGetAsync(key, key, CommandFlags.None); * return result.HasValue ? SerializeDeserialize.Deserialize<Post>(result) : default(Post); * }*/ public async Task <Post> FindPostStringAsync(string key) { var result = await this._redisDbContext.StringGetAsync(key, CommandFlags.None); return(result.HasValue ? SerializeDeserialize.Deserialize <Post>(result) : null); }