Caching

Cache: A store of information that will be required in the future, and can be retrieved quickly. CWSerenade uses caching to store recently used information from the CWSerenade database in a place where it can be accessed quickly, rather than accessing the database, in order to improve performance. Caching occurs across all CWSerenade companies; if you use multiple application servers, you can specify which servers share the same cache. For example, you should have all of your test servers share the same cache and all of your production servers share a cache that is different from the cache assigned to your test servers.

See Caching with Multiple Application Servers.

My Cache Screen

Caching with Multiple Application Servers

Assigning a Server to a Multicast Group

Verifying that Caching for Multiple Application Servers is Configured Correctly

Determining the Subnet for a Server

Which CWSerenade Tables are Cached?

DBTableCacheMapping Properties File

Ehcache

Ehcache.xml File

For more information: See Reload System Cache (RCHE).

My Cache Screen

Purpose: Use the My Cache screen to determine which servers share the same cache and to determine which caches currently contain data.

How to display this screen: If you have Advanced Commands authority, select Advanced Commands from the Document Management screen (My Docs), Job Management screen (My Jobs) or Forms Management screen (My Forms) to advance to the Commands screen; then, select My Cache.

Field

Description

You are connected to Server

The name and IP address of the CWSerenade application server that you are currently logged into.

Servers in Cluster

A list of the servers that share the same cache as the server you are currently logged into. The system does not display a server that shares the same cache until a user logs into CWSerenade using that server. The server information remains on the My Cache screen until the server is restarted or the connection times out due to lack of activity on the server.

Example: SERVER1 and SERVER2 share the same cache. User A logs into SERVER1. At this point, the Servers in Cluster section of the My Cache screen does not display any server information because no one has logged into SERVER2.

User B logs into SERVER2. At this point, SERVER1 displays server information for SERVER2 in the Servers in Cluster section of the My Cache screen and SERVER2 displays server information for SERVER1 in the Servers in Cluster section of the My Cache screen.

User B restarts SERVER2 and logs into SERVER1. At this point, the Servers in Cluster section of the My Cache screen no longer displays server information because no one has logged back into SERVER2.

Note: If a user changes a record in a table that is associated with a cache, the system does not clear the records in the cache and does not remove the cache from this screen; use Reload System Cache (RCHE) to reset the cache.

Multiple Application Servers

If you have configured multiple application servers to share the same cache, you can verify that you have configured the servers correctly by having a user log into CWSerenade using each server. If caching configuration is set up correctly, each server that shares the same cache should display on this screen. See Verifying that Caching for Multiple Application Servers is Configured Correctly.

Server

The IP address of a server that shares the same cache as the server you are currently logged into.

Host Name

The name of a server that shares the same cache as the server you are currently logged into.

Current Cache

A list of the caches that currently contain records.

When does a cache display on this screen?

A cache displays on the My Cache screen if it contains a record. When a CWSerenade process or a user changes a table that is associated with a cache, the system clears the records in the cache and removes the cache from this screen until a new record is added to the cache.

How many records are in the cache?

The Live objects represents the number of records that are in the cache. The system continues to update the Live objects until the cache is cleared or the maximum number of records for the cache is reached.

How many times has a record been retrieved from the cache?

The Hit count represents the number of times the system retrieved data from the cache instead of the database. The system continues to update the Hit count until you stop and restart the SERENADE service or application server.

Cache Name

The name of a cache that currently contains records.

Live Objects

The number of records in the cache.

For example, if two additional charge code records exist in the ADDL.CHARGE.CACHE, the Live Objects is 2.

Note: This number continues to increment until the cache is cleared.

Hit Count

The number of times the system retrieved data from the cache instead of the database.

For example, if records for additional charge code A and additional charge code B exist in the ADDL.CHARGE.CACHE, and the system retrieved additional charge code A from the cache 7 times and retrieved additional charge code B from the cache 2 times, the Hit count is 9.

Note: This number continues to increment until you stop and restart the SERENADE service or stop and restart the application server. If the system clears a cache, when the cache reappears on the screen, the Hit count will still be from the last time the SERENADE service or the server was restarted.

 

Caching with Multiple Application Servers

If you use multiple CWSerenade application servers, each server contains its own cache.

However, in order to keep the cache on each server in sync, if the cache on one server changes, the system updates the cache for all servers that are in the same Multicast Group.

Example: If a user logs in to application server A and makes a change to the Pay Type table, the system clears the PAY.TYPE.CACHE for that server. If application server B shares the same cache as application server A, the system also clears the PAY.TYPE.CACHE on application server B so that server B does not retrieve outdated information.

Assigning a Server to a Multicast Group

The MulticastGroupAddress and MulticastGroupPort settings in the Ehcache.xml File define which servers are in the same Multicast Group. Each server that has the same MulticastGroupAddress and MulticastGroupPort defined in its Ehcache.xml File is considered part of the same Multicast Group. For example, you should assign all of your production servers to the same Multicast Group and all of your test servers to a different Multicast Group.

In addition, each server that is in the same Multicast Group must be within the same subnet; see Determining the Subnet for a Server.

Important: To keep test data separate from production data, you should make sure that your test servers use a different cache from your production servers. Make sure you assign a Multicast Group to your test servers that is different from the Multicast Group that is assigned to your production servers.

For more information: For more information on the Ehcache.xml file and how to configure multiple CWSerenade application servers to share the same cache, contact your MICROS representative.

Verifying that Caching for Multiple Application Servers is Configured Correctly

Once you configure multiple application servers to share the same cache, you can verify that the caching configuration is set up correctly using the My Cache Screen. If caching configuration is set up correctly, each server that shares the same cache should display on the My Cache Screen:

• the server that the user is currently logged into displays for the You are connected to Server field.

• the other servers that share the same cache as the server you are currently logged into displays for the Servers in Cluster field. Note: The system does not display a server that shares the same cache until a user logs into CWSerenade using that server.

 

If you do not see all of the servers that share the same cache on the My Cache Screen:

• Verify that a user is logged into each CWSerenade server that shares the same cache.

• Check the Ehcache.xml file located on each server and verify that the MulticastGroupAddress and MulticastGroupPort settings in the Ehcache.xml file for each server are the same.

• Verify that each server that shares the same cache is part of the same subnet; see Determining the Subnet for a Server.

• Verify that a firewall is not blocking the connection between each server that shares the same cache.

Determining the Subnet for a Server

Use the following steps to determine the subnet address defined for a server.

1.

Log on to the server and select Start > Run to advance to the Run window. At this window, enter cmd in the Open field.

2.

Select OK to advance to the cmd.exe window. At this window, enter IPCONFIG and press Enter to display the subnet address defined for the server.

For more information: For more information about configuring the subnet address defined for a server, contact your System Administrator.

Which CWSerenade Tables are Cached?

Purpose: The dbtablecachemapping.properties file indicates which CWSerenade tables are cached.

DBTableCacheMapping Properties File

The dbtablecachemapping.properties file controls which tables are cached and the name of the cache associated with the table so that the system knows which cache to clear when a CWSerenade process updates the information in a table.

This file provides the table name of each CWSerenade table that is cached and the corresponding cache name; there are other caches that are not associated with a CWSerenade table, such as the caches used for the QAS Address integration.

Important: Do not change the information in the dbtablecachemapping.properties file.

Location of file: This file is normally saved on the CWSerenade application server at the following location, where C: is the root drive of the CWSerenade application server.

C:\Serenade\server\conf\cwdirectcpproperties\ dbtablecachemapping.properties

Table Name

View Name

Cache Name

accitm

Accompanying Item

ACCOMPANYING_ITEM_CACHE

acenty

Entity

ENTITY_CACHE

ccpt00

CC Paytype Cross Ref

PAY_TYPE_CACHE

ccvnrs

CC Vendor Response

CC_VENDOR_RESPONSE_CACHE

cscanr

Cancel Reason

CANCEL_REASON_CACHE

cscscl

Customer Class

CUSTOMER_CLASS_CACHE

csprfx

Prefix Code

PREFIX_CODE_CACHE

csprod

Profile Data

PROFILE_CACHE

csprof

Profile

PROFILE_CACHE

dolofr

Dollar Chart by Offer

DOLLAR_CHART_BY_OFFER_CACHE

fccurv

Curve

ITEM_MISC_CACHE

flshrt

Shipping Rate

SHIPPING_RATE_CACHE

frgofr

Free Gift by Offer/Source

FREE_GIFT_CACHE

ftfefep

Freight Exemption

FRT_EXEMPT_CACHE

ftftdp

Freight Table Detail

FREIGHT_TABLE_DETAIL_CACHE

glacct

General Ledger Account

ACCOUNTING_MISC_CACHE

inabcv

ABC/Velocity

ITEM_MISC_CACHE

infreq

Frequency

ITEM_MISC_CACHE

inhzrd

Hazard

ITEM_MISC_CACHE

inicls

Item Class

ITEM_CLASS_CACHE

inictg

Item Category

ITEM_CLASS_CACHE

inicty

Item Coordinate Type

ITEM_MISC_CACHE

inicyc

Item Cycle

ITEM_DETAIL_CACHE

iniofr

Item Offer

ITEM_OFFER_CACHE

iniskg

Item SKU Group

ITEM_DETAIL_CACHE

inists

Item Status

ITEM_DETAIL_CACHE

inisvo

Item Ship Via Override

ITEM_SHIP_VIA_OVERRIDE_CACHE

inlcls

Location Class

ITEM_DETAIL_CACHE

inldvp

Long SKU Division

ITEM_CLASS_CACHE

inlobp

Line of Business

ITEM_MISC_CACHE

inloc

Location

LOCATION_CACHE

inlskc

Long SKU Class

ITEM_CLASS_CACHE

inlskd

Long SKU Department

LONG_SKU_DEPARTMENT_CACHE

insecf

Secure Feature

SECURED_FEATURE_CACHE

insetd

Set Detail

SET_DETAIL_CACHE

inskeo

SKU Element 1

ITEM_DETAIL_CACHE

insket

SKU Element 3

ITEM_DETAIL_CACHE

inskew

SKU Element 2

ITEM_DETAIL_CACHE

insldo

Soldout Control

SOLDOUT_CONTROL_CACHE

insubs

Item Subscription

ITEM_SUBSCRIPTION_CACHE

inprpp

Prep Code

ITEM_MISC_CACHE

inuom

Unit Of Measure

ITEM_MISC_CACHE

inwrhs

Warehouse

WAREHOUSE_CACHE

inloba

Line of Business Assignment

LOB_ASSIGNMENT_CACHE

msaocp

Add On Code

ITEM_MISC_CACHE

msaucf

Auth User Class Feature

USER_CACHE

msausf

Auth User Feature

USER_CACHE

mscfrd

Miscellaneous Fraud

FRAUD_CACHE

mscnte

Country Extended

STATE_COUNTRY_CACHE

mscnty

Country

STATE_COUNTRY_CACHE

mscoad

Company Address

COMPANY_ADDRESS_CACHE

msctle

Entity System Control Val

ENTITY_SCV_CACHE

msctlv

System Control Value

SCV_CACHE

mscurr

Currency

CURRENCY_CACHE

msdiv

Division

DIVISION_CACHE

msilpr

Integration Layer Process

INTEGRATION_PROCESS_CACHE

msoffr

Offer

OFFER_CACHE

msscf

SCF

SCF_CACHE

msscfe

SCF Extended

SCFEXTENDED_CACHE

msscft

SCF Tax Rate

TAX_RATE_CACHE

msseas

Season

ITEM_MISC_CACHE

msshfd

Special Format

SPECIAL_FORMAT_CACHE

msshpv

Ship Via

SHIP_VIA_CACHE

mssta

State

STATE_COUNTRY_CACHE

mssvwp

Ship Via Weight Charge

SHIP_VIA_WEIGHT_CHARGE_CACHE

msudep

User Defined Exit Point

USER_CACHE

oeadch

Additional Charge

ADDL_CHARGE_CACHE

oeauct

Auth Service Country

STATE_COUNTRY_CACHE

oeausv

Authorization Service

AUTH_SERVICE_CACHE

oeauex

Authorization Service Ext

AUTH_SERVICE_CACHE

oebogo

Promotion BOGO

PROMOTION_CACHE

oecnhd

Continuity Header

CONTINUITY_HEADER_CACHE

oedglp

Division G/L

DIVISION_CACHE

oeexrs

Exchange Reason

EXCHANGE_REASON_CACHE

oeicrc

Item Class Restr by Cust

ITEM_CLASS_RESTRICTION_CACHE

oeicrs

Item Class Restr by SpclH

ITEM_CLASS_RESTRICTION_CACHE

oeicsp

Item Restr by Country/State

ITEM_RESTRICTION_CACHE

oeirct

Item Class Restr by City

ITEM_CLASS_RESTRICTION_CACHE

oeitxx

Item Tax Exempt

ITEM_TAX_EXEMPT_CACHE

oepaye

Pay Type Extended

PAY_TYPE_EXTENDED_CACHE

oepayt

Pay Type

PAY_TYPE_CACHE

oepnck

Order Pending Check

FRAUD_CACHE

oepore

Price Override Reason Ext

PRICE_OVERRIDE_REASON_

EXTENSION_CACHE

oeprcu

Promotion Customer

PROMOTION_LIST_CACHE

oeprex

Promotion Item Exclusion

PROMOTION_LIST_CACHE

oepric

Promotion Item Category

PROMOTION_CACHE

oeprom

Promotion

PROMOTION_CACHE

oepror

Price Override Reason

PRICE_OVERRIDE_REASON_CACHE

oeprsr

Promotion Source

PROMOTION_CACHE

oertrs

Return Reason

RETURN_REASON_CACHE

oesfrc

Dollar Chart by Source

DOLLAR_CHART_BY_SOURCE_CACHE

oeshim

Shipper/Item

SHIPPER_ITEM_CACHE

oetype

Order Type

ORDER_TYPE_CACHE

oezpct

Zip/City/State Tax Rate

TAX_RATE_CACHE

oezpsv

Zip Ship Via

ZIP_SHIP_VIA_CACHE

oezrcp

Zone Reservation

ITEM_MISC_CACHE

povend

Vendor

VENDOR_CACHE

povia

PO Ship Via

ITEM_MISC_CACHE

rtndis

Return Disposition

RETURN_DISPOSITON_CACHE

scfvia

SCF Ship Via

SCF_VIA_CACHE

scuser

User

USER_CACHE

users

N/A

JENASYS_USER_CACHE

Ehcache

Purpose: CWSerenade uses Ehcache1 to manage caching. Ehcache is a widely used open source Java cache. For more information about Ehcache, visit the ehcache web site (http://ehcache.sourceforge.net/).

Ehcache.xml File

The Ehcache.xml file is used to configure how caching works in CWSerenade.

A separate Ehcache.xml file should exist on each CWSerenade application server.

Location of file: This file is normally saved on the CWSerenade application server at the following location, where C: is the root drive of the server.

C:\Serenade\server\additional-lib\ehcache.xml

Important: Talk to your MICROS representative before making any changes to the information in the Ehcache.xml file.

The settings that you may wish to review for troubleshooting purposes are described below.

Setting

Description

cacheManagerPeerProviderFactory

peerDiscovery

automatic = Indicates the system detects which CWSerenade application servers share the same cache by checking the multicastGroupAddress and multicastGroupPort defined for each application server.

multicastGroupAddress

The multicast group address assigned to each server that shares a cache.

Valid multicast group addresses must be within the range of 224.0.0.1 to 238.000.000.000. The default setting is 235.0.0.1.

Note: This is not the IP address of the server; you can enter any number as the group address as long as it is between the range of 224.0.0.1 and 238.000.000.000.

multicastGroupPort

The port number assigned to each server that shares a cache.

The port number can be any number, as long as each server is assigned the same multicast group port number.

timeToLive

Indicates the level at which multiple application servers can share the same cache.

0 = Share the same host.

1 = Share the same subnet.

32 = Share the same site.

64 = Share the same region.

128 = Share the same continent.

255 = Unrestricted.

Note: CWSerenade is configured to share the same cache at the subnet level (timeToLive is 1). If you need to configure a higher level at which multiple CWSerenade application servers share the same cache, contact your MICROS representative.

 




  1. Ehcache copyright Luck Consulting Pty Ltd.

caching Serenade 5.0 March 2015