caching - How to store two different cache "tables" in Redis under the same database/index? -
trying build data set of 2 cache tables (which stored in sql server) - 1 actual cache table (cachetbl); other staging table (cachetbl_staging).
the table structure has 2 columns - "key", "value"
so i'm wondering how implement in redis i'm total noob nosql stuff. should use set or list? or else?
thank in advance!
you need decide whether want separate redis keys entries using set , get, or put them hashes hset , hget. if use first approach, keys should include prefix distinguish between main , staging. if use hashes, not necessary, because hash name can used distinguish these. need decide how want check cache validity, , cache flushing strategy should be. requires additional data structures in redis.
Comments
Post a Comment