it's the classic trade between spacecomplexity and timecomplexity the question is do you need them in runtime ? how do you invalidate the cache ? how is the lifecycle of an entry ? .... in doubt -> go for the database you can optimize later when you reach the problems and you save yourself the uncertain parts when you got metrics :)
that's at least my opinion -> just profile your system on regular basis and collect metrics so you can see what's pressing :)