官术网_书友最值得收藏!

Caching

The last major subsystem that I will include here is the caching layer. Drupal 8 has gone to great lengths to improve the performance of building pages and rendering data. To this end, the caching system has become an important part to consider whenever we either do complex or heavy calculations or render content.

From a module developer's perspective, there are two main pillars of the caching system. The first one provides developers a cache backend to store the result of complex data calculations. This data can be read in the next requests to avoid the need for redoing those calculations. This goes hand in hand with cache invalidation when something in the system changes that would require the calculations to be redone. The second pillar is the render cache, which allows developers to wrap their data output with metadata that describe in what context and when that data output needs to be invalidated or changed. The entire markup of that bit gets cached and invalidated based on the rules of the metadata.

We will see these in action in a later chapter dedicated to caching.

主站蜘蛛池模板: 耿马| 星座| 兴安县| 镇坪县| 资兴市| 诸城市| 武川县| 江油市| 闻喜县| 富源县| 简阳市| 随州市| 盐亭县| 赤壁市| 兰西县| 涟源市| 黑水县| 长垣县| 湖州市| 宜阳县| 五峰| 开阳县| 江源县| 东至县| 新蔡县| 庆阳市| 砚山县| 河池市| 城口县| 尤溪县| 永和县| 汶上县| 武安市| 赣榆县| 子长县| 成安县| 遂平县| 永胜县| 巴彦县| 衡南县| 积石山|