Configuring Cache

This section explains the API configuration for cache service.

Generic configuration microservice requires cache configuration, which helps to determine the application configuration that should be stored in the cache service. Cache configuration data is stored in cache_configuration table. Generic configuration microservice contains five APIs to manage the cache configuration. You can configure which application configuration data should be stored in the cache service with the help of these APIs.

Management APIs

This section describes the generic configuration microservice APIs for cache configuration. The following tables lists the APIs and their implementation methods.

OperationId Implementation

AddCacheConfiguration

com.temenos.microservice.genericconfig.function.AddCacheConfigurationImpl

GetCacheConfiguration

com.temenos.microservice.genericconfig.function.GetCacheConfigurationImpl

UpdateCacheConfiguration

com.temenos.microservice.genericconfig.function.UpdateCacheConfigurationImpl

DeleteCacheConfiguration

com.temenos.microservice.genericconfig.function.DeleteCacheConfigurationImpl

GetAllCacheConfiguration

com.temenos.microservice.genericconfig.function.GetAllCacheConfigurationImpl

ADD CACHE CONFIGURATION
This API allows the application to add a new cache configuration under the given groupId.

POST/system/cache/configurationgroups/{groupId}/configuration

Sample URL
http://<IPADDRESS>:7006/ms-genericconfig-api/api/v1.0.0/system/cache/configurationgroups/{groupId}/configuration
Request
{
     "configName": [
        "paymentscreator",
    ],
    "expires": "200",
    "data": [{}]
}
Sample Response
{
    "groupId": "SECURITY.POLICY",
    "configNames": [
        " paymentscreator "
    ],
    "expires": "200",
    "data": [
        {}	
    ]
}
GET CACHE CONFIGURATION
This API allows the application to get the cache configuration under the given groupId.

GET/system/cache/configurationgroups/{groupId}/configuration

Sample URL
http://<IPADDRESS>:7006/ms-genericconfig-api/api/v1.0.0/system/cache/configurationgroups/{groupId}/configuration
Response
 {
    "groupId": "SECURITY.POLICY",
    "configNames": [
        " paymentscreator "
    ],
    "expires": "200",
    "datas": [
        {}	
    ]
}
UPDATE CACHE CONFIGURATION
This API allows the application to modify the cache configuration data under the given groupId.

PUT/system/cache/configurationgroups/{groupId}/configuration

Sample URL
http://<IPADDRESS>:7006/ms-genericconfig-api/api/v1.0.0/system/cache/configurationgroups/{groupId}/configuration
Request
{
    "configName": [
        "paymentapprover"
    ],
    "mode": "add",
    "expires": "200",
    "data": [
        {}
    ]
}
Sample Response
{
    "groupId": "SECURITY.POLICY",
    "configNames": [
        " paymentscreator ",
        " paymentapprover "
    ],
    "expires": "200"
}

There are two modes available:

  • Add - Used to add the configuration names with existing configuration names.
  • Delete - Used to delete the configuration names from existing configuration.
DELETE CACHE CONFIGURATION
This API allows the application to delete the cache configuration data.

DELETE/system/cache/configurationgroups/{groupId}/configuration

Response
{
    "groupId": "SECURITY.POLICY",
    "configNames": [
        " paymentscreator "
    ],
    "expires": "200",
    "datas": [
        {}	
    ]
}
GET ALL CACHE CONFIGURATION
This API allows the application to retrieve the all the cache configurations.

GET/system/cache/configurationgroups/configuration

Sample URL
http://<IPADDRESS>:7006/ms-genericconfig-api/api/v1.0.0/system/cache/configurationgroups/configuration
Response
 {
     "items": [
        {
            "groupId": "SECURITY.POLICY",
            "configNames": [
                "paymentapprover"
            ],
            "expires": "200"
        }
    ]
}

Copyright © 2020- Temenos Headquarters SA

Published on :
Wednesday, October 12, 2022 6:50:03 PM IST

Feedback
x