Page MenuHomePhorge

Chwala - seafile driver not using cache
Open, 40Public


I enabled the cache in Roundcubemail,

$config['fileapi_seafile_cache'] = 'db';
$config['fileapi_seafile_cache_ttl'] = '14d';

but the cache is never created in the DB.

I noticed that Roundcube requires the $_SESSION['user_id'] to be set in order to create a cache:

if (!isset($this->caches[$name]) && ($userid = $this->get_user_id())) {
        $this->caches[$name] = new rcube_cache($type, $userid, $name, $ttl, $packed);

The seafile driver doesn't set the _SESSION['user_id'] and never gets a cache to fill / read.
However the kolab_file_storage sets the $_SESSION variables.

Do I miss something ? How can I fix this ?

Kind regards,


Ticket Type

Event Timeline

What is your config (only fileapi_* options)? When user logs into Chwala kolab driver is used to authenticate the user, so the user_id should be set in session.

root@xxx:/etc/roundcubemail# cat | grep fileapi

$config['fileapi_manticore'] = 'http://' . $_SERVER['HTTP_HOST'] . ':8080';
$config['fileapi_backend'] = 'seafile';
$config['fileapi_seafile_host'] = "";
$config['fileapi_seafile_ssl_verify_peer'] = false;
$config['fileapi_seafile_ssl_verify_host'] = false;
$config['fileapi_seafile_cache'] = 'db';
$config['fileapi_seafile_cache_ttl'] = '14d';
$config['fileapi_seafile_debug'] = false;

Ok. This is what the original sample config says:

// Main files source, backend driver which handles
// authentication and configuration of Chwala
// Note: Currently only 'kolab' is supported
$config['fileapi_backend'] = 'kolab';

So, this is not supported. Even if we implement this, it might be hard to use the Roundcube cache, because it requires ID of the user from users table.

ok. I followed the doc:

"Using Seafile as an exclusive storage mechanism"

Is the second part of the doc supported ?
"Using Seafile as an add-on to the existing Kolab storage"

The doc shows a few parameters:

  1. $config['fileapi_seafile_host'] = "";

--> but the dialog box "add external storage" requires a server hostname...

  1. $config['fileapi_seafile_cache'] = '14d';

--> aren't the cache parameters more like:

$config['fileapi_seafile_cache'] = 'db' 
$config['fileapi_seafile_cache_ttl']  ='14d'