Implemented caching of DOM items.

Signed-off-by: Elavarasanlee <lee.jsss15@gmail.com>