[SOLVED] Cache in LDAP searches - Parameter in Config.pm

Moderator: crythias

Locked
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

[SOLVED] Cache in LDAP searches - Parameter in Config.pm

Post by amdkryn »

I need an explanation regarding the possibility of using cache in LDAP searches. I researched that there is a parameter in Config.pm but never used it as I do not know what options I use.

Here's an example I found on forum:

Config.pm:
# AutoLoginCreation => 0,
# # generate auto login prefix
# AutoLoginCreationPrefix => 'auto',
# # admin can change customer preferences
# AdminSetPreferences => 1,
# # use customer company support (reference to company, See CustomerCompany settings)
# CustomerCompanySupport => 1,
# cache time to live in sec. - cache any database queries
CacheTTL => 60 * 60 * 24,
# # just a read only source
# ReadOnly => 1,


My question refers to the "CacheTTL => 60 * 60 * 24," how these parameters? LDAP must streamline the search process and make too few changes in Active Directory. If I wanted to keep the cache for a week, how would you do?

My AD and LAN servers are high performance, everything works great.
Last edited by amdkryn on 09 Feb 2016, 14:02, edited 1 time in total.
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Re: Cache in LDAP searches - Parameter in Config.pm

Post by amdkryn »

Someone? I tried to find this information by searching on google and forum but not found.
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Cache in LDAP searches - Parameter in Config.pm

Post by jojo »

it expects the cache time in seconds (you can also compute like in the example you posted)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Re: Cache in LDAP searches - Parameter in Config.pm

Post by amdkryn »

I still do not understand. If I set like the example I posted, what is the benefit? I will have faster responses when completing the Customer User field (or CustomerID)?

At the moment it takes about 20 seconds to link the user to the ticket on the screen http://server/otrs/index.pl?Action=AgentTicketPhone.
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Cache in LDAP searches - Parameter in Config.pm

Post by jojo »

Speeding up repeted searches and data reading is the typical usecase for caching...
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Re: Cache in LDAP searches - Parameter in Config.pm

Post by amdkryn »

I know what it means cache, but the parameter below mean what? Anybody know?
CacheTTL => 60 * 60 * 24

60 seconds ?
24 = One day?
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Cache in LDAP searches - Parameter in Config.pm

Post by jojo »

as the value of the cahce is in seconds it would meach 24 hours
60 (seconds) x 60 x (minutes) x 24 (hours)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Locked