A microprocessor-based system generates an electronic document based on a set of microprocessor-readable instructions organized in logical units known as instruction nodes. Each instruction node includes at least one microprocessor-readable instruction. If an instruction node is eligible for caching, it is associated with a cache key value, which is compared with a cache key value that is stored in a cache memory and that is associated with a data item. If the cache key value associated with the instruction node matches the cache key value stored in the cache memory, the microprocessor-based system retrieves the data item with the cache key value stored in the cache memory, rather than executing the instruction node. The microprocessor-based system generates at least a portion of the electronic document as a function of the retrieved data item.