<p>Add the following lines in <code>/var/lib/jenkins/config.xml</code> under <code>securityRealm</code> and then restart <code>jenkins</code> service to enable cache. Remove the below 4 line if you don't want to enable it.</p>

<pre><code>&lt;cache&gt;
  &lt;size&gt;500&lt;/size&gt;
  &lt;ttl&gt;3600&lt;/ttl&gt;
&lt;/cache&gt;
</code></pre>

<p>Please refer the below image</p>

<p><a href="https://i.sstatic.net/UnULV.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UnULV.png" alt="Jenkins config file snippet"></a></p>

CC BY-SA 4.0
2020-02-17T10:48:01.197Z
2020-02-17T10:54:54.570Z
2020-02-17T10:54:54.570Z
Nitish
<p>I want to know how can I modify the below setting from Jenkins server and not UI:</p>

<p><a href="http://XXXXX:YYYYY/configureSecurity/" rel="nofollow noreferrer">http://XXXXX:YYYYY/configureSecurity/</a></p>

<p><a href="https://i.sstatic.net/sD9hm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/sD9hm.png" alt="cache"></a></p>

CC BY-SA 4.0
2020-02-17T09:54:16.467Z
what is the plugin that you have installed? I don't have this option on my jenkins
Nitish
CC BY-SA 4.0
2020-02-17T10:15:13.317Z
I guess LDAP plugin: https://plugins.jenkins.io/ldap/
arielma
<jenkins><linux>
Which Jenkins file is responsible for Enable cache setting
arielma
# Which Jenkins file is responsible for Enable cache setting

(Asked by: username_0 on 2020-02-16)

I want to know how can I modify the below setting from Jenkins server and not UI:

<http://XXXXX:YYYYY/configureSecurity/>

[![cache](https://i.sstatic.net/sD9hm.png)](https://i.sstatic.net/sD9hm.png)

**Tags:** jenkins, linux

> **Comments:**
> **username_1**: what is the plugin that you have installed? I don't have this option on my jenkins  
> **username_0**: I guess LDAP plugin: https://plugins.jenkins.io/ldap/  

---

## 1 answers

### Answer by username_1 on 2020-02-17. Score: 1 | Accepted answer

Add the following lines in /var/lib/jenkins/config.xml under securityRealm and then restart jenkins service to enable cache. Remove the below 4 line if you don't want to enable it.

  500
  3600


Please refer the below image


---

