Added caching to Printer class.