ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

SAP Hybris platform和Netweaver的缓存(Cache)设计机制

2020-02-29 19:05:48  阅读:370  来源: 互联网

标签:product SAP item cached Cache When platform cache Hybris


Hybris Cache

(1 )The Hybris Cache is a part of the Hybris persistence layer.
(2) It improves the performance of a single server node by reducing the amount of database queries.
(3) It transparently stores search results, item attributes, and item instances in memory.

Hybris cache的目的是为了减少对DB layer的访问.

When Data Is Cached

The Hybris Cache works transparently. Every time the API is accessed, the cache intercepts calls and handles caching implicitly. The following examples present how caching works:

(1) Caching item attributes:

When calling product.getCode(), the underlying data is returned from the cache or, if not yet cached, retrieved and written to the cache.

When calling product.setCode(X), the cached value is removed (invalidated) from the cache, because it is no longer valid.

(2) Caching FlexibleSeach results:

When executing a FlexibleSearch query like SELECT code FROM Product, the result list is cached in the main cache.

When a product is removed, then its item data and the cached FlexibleSearch result for the above query is removed from the cache.

从这一点来说,Hybris platform cache和Netweaver table buffer做的作用一样。在ABAP里,application developer写Open SQL时也从不用去care当前用SELECT读进内表的数据到底是从buffer里读的,还是从DB里读出来的。


从buffer里读取效率比从DB里高得多:

DATA: ls TYPE crmc_proc_type,
ls2 TYPE comm_product.
SELECT SINGLE * INTO ls FROM crmc_proc_type.
SELECT SINGLE * INTO ls2 FROM comm_product.
单位:微秒




ST02查看Netweaver的table buffer:


Hybris里在admin console里查看和管理cache:

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

汪子熙 博客专家 发布了6818 篇原创文章 · 获赞 648 · 访问量 113万+ 他的留言板 关注

标签:product,SAP,item,cached,Cache,When,platform,cache,Hybris
来源: https://blog.csdn.net/i042416/article/details/104579423

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有