Enable oslo.cache library

Add manila:server:cache metadata

      cache:
        engine: memcached
        expiration_time: 600
        backend_argument:
          memcached_expire_time:
            value: 660
        members:
        - host:
          port: 11211
        - host:
          port: 11211
        - host:
          port: 11211

Enable oslo.cache in the manila.conf file

Change-Id: Iee7213d0e37e7939feb5f18e323e4e9c01c8018b
Related-Prod: PROD-26960
diff --git a/manila/files/queens/manila.conf b/manila/files/queens/manila.conf
index 08bc897..b39dcfa 100644
--- a/manila/files/queens/manila.conf
+++ b/manila/files/queens/manila.conf
@@ -1737,3 +1737,8 @@
 {%- endfor %}
 {%- endif %}
 
+{%- if server.cache is defined %}
+{%- set _data = server.cache %}
+[cache]
+{%- include "oslo_templates/files/queens/oslo/_cache.conf" %}
+{%- endif %}
diff --git a/manila/files/rocky/manila.conf b/manila/files/rocky/manila.conf
index f8c40e0..a2606f4 100644
--- a/manila/files/rocky/manila.conf
+++ b/manila/files/rocky/manila.conf
@@ -1792,3 +1792,9 @@
 # Sets the list of available ciphers. value should be a string in the
 # OpenSSL cipher list format. (string value)
 #ciphers = <None>
+
+{%- if server.cache is defined %}
+{%- set _data = server.cache %}
+[cache]
+{%- include "oslo_templates/files/rocky/oslo/_cache.conf" %}
+{%- endif %}
diff --git a/metadata/service/common/cluster.yml b/metadata/service/common/cluster.yml
index bcce15f..3d4f172 100644
--- a/metadata/service/common/cluster.yml
+++ b/metadata/service/common/cluster.yml
@@ -43,3 +43,16 @@
             enabled: ${_param:openstack_fluentd_handler_enabled}
           ossyslog:
             enabled: ${_param:openstack_ossyslog_handler_enabled}
+      cache:
+        engine: memcached
+        expiration_time: 600
+        backend_argument:
+          memcached_expire_time:
+            value: 660
+        members:
+        - host: ${_param:openstack_control_node01_address}
+          port: 11211
+        - host: ${_param:openstack_control_node02_address}
+          port: 11211
+        - host: ${_param:openstack_control_node03_address}
+          port: 11211
diff --git a/metadata/service/common/single.yml b/metadata/service/common/single.yml
index 4919207..a329043 100644
--- a/metadata/service/common/single.yml
+++ b/metadata/service/common/single.yml
@@ -43,3 +43,12 @@
             enabled: ${_param:openstack_fluentd_handler_enabled}
           ossyslog:
             enabled: ${_param:openstack_ossyslog_handler_enabled}
+      cache:
+        engine: memcached
+        expiration_time: 600
+        backend_argument:
+          memcached_expire_time:
+            value: 660
+        members:
+        - host: ${_param:single_address}
+          port: 11211
diff --git a/tests/pillar/server_cluster.sls b/tests/pillar/server_cluster.sls
index bae2402..4e6ab2c 100644
--- a/tests/pillar/server_cluster.sls
+++ b/tests/pillar/server_cluster.sls
@@ -23,6 +23,10 @@
       password: misterio
     cache:
       engine: memcached
+      expiration_time: 600
+      backend_argument:
+        memcached_expire_time:
+          value: 660
       members:
         - host: 127.0.0.1
         - host: 127.0.0.1