How "frequently used data" and cache work in databases
Caching with these DBMS is at the block/page level. Data must be in memory to be used. The high-level process is that the DBMS first looks in cache, and if not present, reads the needed blocks/pages into memory for use. Implementation details vary greatly by DBMS but generally buffers are reused by a LRU algorithm with the intent to keep hot data in cache and evict less frequently used data so that the greatest benefit is realized by limited memory resources. 

To address performance, perform query and index tuning so that the minimal amount of data must be retrieved from storage and add as much memory as you can for caching.