TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bala murugan
NA
76
2.2k
How to use Redis cache in Web Api with repository
Feb 5 2018 5:13 AM
am new in Redis cache implementation and got in simple example with getstring from Redis Cache which is working fine. But the Same time I didn't get any idea about Set and get list values through Redis.
I have Using Provider and Repository. Please help me how to further proceed...
public
List<Article> GetArticleListBySectionName(
string
sectionName,
int
RegionId,
int
Count,
int
CacheTime,
string
cacheKey,
bool
cacheEnable =
false
,
string
expiryInMinutes =
"NoExpiry"
)
{
{
cacheKey = GetCacheKey(cacheKey, Convert.ToString(sectionName));
List<Article> _article = _cacheProxy.Get<List<Article>>(cacheKey);
if
(_article !=
null
)
{
_article = _articleRepositary.GetArticleListBySectionName(sectionName, RegionId, Count, CacheTime);
_cacheProxy.Store<List<Article>>(_article, cacheKey, expiryInMinutes);
}
return
_article;
}
}
Here _cacheProxy.Get and _cacheProxy.Store getting null values..While executing this, I ll getting error page
Reply
Answers (
1
)
Go by Value in JSON in precise?
How to call web API from Xamarin visual studio 2015