caching - Enum vs cache? Which one is better -
i found out co_workers using enum lot. , using enum kind of data store lists, status list, role list, etc.. , not sure if way deal kind of data. put data db , read them cache instead of putting data code itself.
the decision of enum vs. database table depends on whether expect additional values added/removed while system in production.
for example:
use enum for:
payment method (cash, check or credit card)
billing frequency (daily, weekly, monthly, quarterly)
gender
status
use database table for:
carrier delivery (fedex, ups, ???)
product category (books, music, games, ???)
airline
Comments
Post a Comment