Processing components that work with data servers allow caching when connected to a server. Caching reduces message processing time by a rule list. This is ensured by the fact that connection to a data server is established only once and maintained for as long as is necessary.
AEP uses caching in the following components:
Caching can be used:
●for single message processing by a rule list
●for the whole session, i.e. as long as all messages received in one account check are being processed
Enable Caching
Use caching
Enable Session Cache
Use caching for whole session
Remarks
Besides making the processing faster, caching allows using special features of some databases. For example, when adding a line into MySQL table, identifier of the entry added can be parsed using the LAST_INSERT_ID function.
INSERT INTO CLIENT (id,email)
VALUES(NULL,'<%Sender%>); # generate ID by inserting NULL
INSERT INTO ORDER (client,orderno)
VALUES(LAST_INSERT_ID(),'<%OrderNo%>'); # use ID in second table
Database Access component allows executing only one SQL expression. So, two components are needed to perform the instructions. Without caching, LAST_INSERT_ID() will always return 0 in the second instruction. This happens because connection is terminated once the component with the first instruction is executed, and the value LAST_INSERT_ID is lost. Caching offers a solution for this problem.