Layer.cached

Function/Meaning
Whether to perform caching
Type
Layer class property (read/write)
Description
Indicates whether caching is performed. You can also set this value.
When caching is enabled, an image of the layer itself and all its child layers composited together is pre-calculated and stored. From then on, as long as there are no changes to the layer or its children, image operations for compositing them will not be performed (the cache is automatically reconstructed if changes occur).
If caching is disabled, compositing operations are performed every time the screen is updated.
By default, caching is not performed, but it is automatically enabled during transitions (however, this property does not reflect the state of caching that is automatically enabled during transitions, etc.).
In cases where it is known that the image and state of a layer and its children will not change, and the screen is frequently redrawn, enabling caching for that layer will improve overall performance.