]> git.mxchange.org Git - quix0rs-gnu-social.git/commit
Adds new feature to dispatch avatar url between different servers.
authorJean Baptiste Favre <statusnet@jbfavre.org>
Sat, 3 Sep 2011 19:11:31 +0000 (21:11 +0200)
committerJean Baptiste Favre <statusnet@jbfavre.org>
Sat, 3 Sep 2011 19:11:31 +0000 (21:11 +0200)
commit98f064e4fdea8a143c207ca1b8da3e0b62b6405d
tree5b45c5ae95a5f0df4788ff6253167e0516c18f16
parentafd42611a3c5dc2366123ac5cfdcadec1a7ea373
Adds new feature to dispatch avatar url between different servers.
That allows parallel download from most browsers.
To avoid caching issue, server choice is "profile_id" based so that
avatar from a specific user will always be served from same server.

Introduce new configuration parameter:
$config['avatar']['server_modulo'] = 5;

Very easy to implement using, for example, DNS wildcard.
For example, if you have following configuration:
$config['avatar']['server']        = 'static_rrdns_.domain.tld';
$config['avatar']['server_modulo'] = 5;

Then, when building avatar's URL, domain will become, depending on profile_id:
static0.domain.tld
static1.domain.tld
static2.domain.tld
static3.domain.tld
static4.domain.tld
classes/Avatar.php