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

简介:

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:

本文来自云栖社区合作伙伴“汪子熙”,了解相关信息可以关注微信公众号"汪子熙"。

相关文章
|
3月前
|
监控 前端开发 数据可视化
SAP 标准 OData 服务 ABAP_REPOSITORY_SRV 的作用介绍
SAP 标准 OData 服务 ABAP_REPOSITORY_SRV 的作用介绍
31 1
|
6月前
|
前端开发 JavaScript 中间件
SAP Fiori Tools 里 proxy 中间件的使用场景介绍
SAP Fiori Tools 里 proxy 中间件的使用场景介绍
56 0
|
12月前
|
缓存
SAP OData 框架里的缓存(Cache)设计专题讲座试读版
SAP OData 框架里的缓存(Cache)设计专题讲座试读版
|
SQL 缓存 API
SAP Hybris platform和Netweaver的缓存(Cache)设计机制
SAP Hybris platform和Netweaver的缓存(Cache)设计机制
128 0
SAP Hybris platform和Netweaver的缓存(Cache)设计机制
|
缓存
SAP Fiori OData gateway 和后台 ABAP 系统的双缓存表(cache table)设计
SAP Fiori OData gateway 和后台 ABAP 系统的双缓存表(cache table)设计
136 0
SAP Fiori OData gateway 和后台 ABAP 系统的双缓存表(cache table)设计
|
XML Java Maven
部署在SAP ABAP服务器上的SAP UI5应用,resource root的计算逻辑
Created by Jerry Wang, last modified on Oct 22, 2015 file: .UI5RepositoryAppSetup
111 0
部署在SAP ABAP服务器上的SAP UI5应用,resource root的计算逻辑
|
Java vr&ar UED
SAP ABAP SM50事务码和Hybris Commerce的线程管理器
SAP ABAP SM50事务码和Hybris Commerce的线程管理器
100 0
SAP ABAP SM50事务码和Hybris Commerce的线程管理器
|
应用服务中间件 API 容器
SAP Netweaver和Hybris Commerce启动后执行的默认操作
SAP Netweaver和Hybris Commerce启动后执行的默认操作
SAP Netweaver和Hybris Commerce启动后执行的默认操作
如何在ABAP Netweaver和CloudFoundry里记录并查看日志
如何在ABAP Netweaver和CloudFoundry里记录并查看日志
如何在ABAP Netweaver和CloudFoundry里记录并查看日志
ABAP Netweaver和Hybris里获得内存使用统计数据
ABAP Netweaver和Hybris里获得内存使用统计数据
ABAP Netweaver和Hybris里获得内存使用统计数据