Bug 53149 - mod_ldap should/could use mod_socache
Summary: mod_ldap should/could use mod_socache
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_ldap (show other bugs)
Version: 2.4-HEAD
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-25 16:38 UTC by Eric Covener
Modified: 2023-08-27 20:29 UTC (History)
2 users (show)



Attachments
Simple code (1.22 KB, patch)
2023-08-24 22:24 UTC, Ruslan Semchenko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Covener 2012-04-25 16:38:22 UTC
mod_ldap should/could use mod_socache for its various caches, currently it has its own apr_rmm based cache.
Comment 1 quan 2020-11-14 04:45:02 UTC
hi I wonder is there anyone working on this, I can lend a hand
Comment 2 Christophe JAILLET 2020-11-14 10:58:54 UTC
Hi,
feel free to look at it and propose patches.
Contribution are always welcomed!

Bugzilla is not always the best tool for communication. Should you need to exchange, ask for advice, explanation or whatever, our mailing list dev@httpd.apache.org may be more appropriate.

Please also not that some of our developers can be contacted via IRC, depending of their availability. 

All details on: https://httpd.apache.org/support.html
Comment 3 Ruslan Semchenko 2023-08-24 22:24:16 UTC
Created attachment 38919 [details]
Simple code

1. Added mod_socache module to handle various caches:
   - Use `socache_socache dbm:/path/to/ldap_cache.dbm` for LDAP cache.
   - Used `socache_socache shmcb:/path/to/other_cache.shmcb` for other caches.

2. Configured mod_ldap cache options using mod_socache:
   - `LDAPCacheEntries` sets the maximum number of cache entries.
   - `LDAPCacheTTL` sets cache lifetime (in seconds).
   - `LDAPCacheSize` sets the maximum cache size in kilobytes.
   - `LDAPCacheURI` specifies the URI to access the LDAP server.
   - `LDAPCacheSharedCache` sets the shared cache path for mod_ldap and mod_socache modules.
Note that you need to replace `/path/to/ca.crt`, `/path/to/ldap_cache.dbm` and `/path/to/other_cache.shmcb` with the appropriate values ​​for your configuration. Also configure the rest of the values ​​(e.g. `ldap.example.com`, `dc=example,dc=com`, `cn=admin,dc=example,dc=com` and `adminpassword`) according to your LDAP configuration- server.
Comment 4 Eric Covener 2023-08-27 20:29:12 UTC
(In reply to Ruslan Semchenko from comment #3)
> Created attachment 38919 [details]
> Simple code
> 
> 1. Added mod_socache module to handle various caches:
>    - Use `socache_socache dbm:/path/to/ldap_cache.dbm` for LDAP cache.
>    - Used `socache_socache shmcb:/path/to/other_cache.shmcb` for other
> caches.
> 
> 2. Configured mod_ldap cache options using mod_socache:
>    - `LDAPCacheEntries` sets the maximum number of cache entries.
>    - `LDAPCacheTTL` sets cache lifetime (in seconds).
>    - `LDAPCacheSize` sets the maximum cache size in kilobytes.
>    - `LDAPCacheURI` specifies the URI to access the LDAP server.
>    - `LDAPCacheSharedCache` sets the shared cache path for mod_ldap and
> mod_socache modules.
> Note that you need to replace `/path/to/ca.crt`, `/path/to/ldap_cache.dbm`
> and `/path/to/other_cache.shmcb` with the appropriate values ​​for your
> configuration. Also configure the rest of the values ​​(e.g.
> `ldap.example.com`, `dc=example,dc=com`, `cn=admin,dc=example,dc=com` and
> `adminpassword`) according to your LDAP configuration- server.

LDAPCacheSharedCache and LDAPCacheURI don't exist.
mod_ldap doesn't have code to talk to mod_socache.