I am having two issues regarding caching.
I am using EF 6. and have a table named like "memberConfig" which has many fields of member like latLng, lastAccessTime, ..
I am writing current time to lastAccessTime field in every api call. like
var memberConfig = db.memberConfig.find(memNo);
memberConfig.lastAccessTime = DateTime.Now;
and there's time when I have to write members' latLng data to theirs latLng field every 10 seconds. and other people access to that latLng data.
As you guess It's kind of tracking someone's position.
I guess caching is better than accessing to database in terms of performance.
I am having an idea about using static variable or static dbcontext without database(Entity framework), or memoryCache, redis.
What's the best practice I should try in short time?
sorry for my english, I am not a native, I am not good at english.