Skip to content

Commit f156ea3

Browse files
author
ens_adm02
committed
Merging postreleasefix/113 to release/113
* postreleasefix/113: Update nginx and memcached plugins
2 parents 52dcae7 + 2933d6b commit f156ea3

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

memcached/modules/EnsEMBL/Web/Cache.pm

+14
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,27 @@ sub new {
6262
sub set {
6363
my ($self, $key, $value, $exptime) = @_;
6464

65+
return unless $value;
66+
6567
my $result = $self->SUPER::set(md5_hex($key), $value, $exptime);
6668

6769
$self->_warn(sprintf 'MEMCACHED->set(%s): %s', $key, $result ? 'DONE' : 'FAIL');
6870

6971
return $result;
7072
}
7173

74+
sub set_raw {
75+
my ($self, $key, $value, $exptime) = @_;
76+
77+
return unless $value;
78+
79+
my $result = $self->SUPER::set($key, $value, $exptime);
80+
81+
$self->_warn(sprintf 'MEMCACHED->set_raw(%s): %s', $key, $result ? 'DONE' : 'FAIL');
82+
83+
return $result;
84+
}
85+
7286
sub get {
7387
my ($self, $key) = @_;
7488

nginx/conf/nginx.conf.tmpl

+5-4
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ http {
5858
memcached_send_timeout 50;
5959
error_page 502 503 /errors;
6060

61-
location ~* \.(jpg|jpeg|png|gif|js|css|txt|xml|csv|gff|fa|nh|gz|tar|zip|pdf|swf|jar|ico|htm)$ {
61+
location ~* \.(jpg|jpeg|png|gif|js|css|txt|xml|csv|gff|fa|nh|gz|tar|zip|pdf|swf|jar|ico|htm|svg)$ {
6262
expires 30d;
63-
set_md5 $md5_request_uri "[["$SiteDefs::ENSEMBL_PROXY_PROTOCOL:$SiteDefs::ENSEMBL_STATIC_BASE_URL"]]$request_uri";
63+
set_md5 $md5_request_uri "[["$SiteDefs::ENSEMBL_STATIC_BASE_URL"]]$request_uri";
6464
set $memcached_key "nginx-$md5_request_uri";
6565
memcached_pass memcached_servers;
6666
error_page 404 502 = @fetch;
@@ -79,8 +79,9 @@ http {
7979
}
8080

8181
location /errors {
82-
[[ $SiteDefs::ENSEMBL_NGINX_EC2? '#' : '' ]]proxy_pass [["$SiteDefs::ENSEMBL_PROXY_PROTOCOL:$SiteDefs::ENSEMBL_BASE_URL"]]/errors/ensembl.html;
83-
[[ $SiteDefs::ENSEMBL_NGINX_EC2? '' : '#' ]]root /ensemblweb/www/server/ebi-plugins/amazonEC2/htdocs;
82+
rewrite ^.*$ /Crash break;
83+
[[ $SiteDefs::ENSEMBL_NGINX_EC2? '#' : '' ]]proxy_pass [["$SiteDefs::ENSEMBL_PROXY_PROTOCOL://$SiteDefs::ENSEMBL_SERVER:$SiteDefs::ENSEMBL_PORT"]];
84+
[[ $SiteDefs::ENSEMBL_NGINX_EC2? '' : '#' ]]root /ensemblweb/www/server/ebi-plugins/amazonEC2/htdocs;
8485
}
8586

8687
}

0 commit comments

Comments
 (0)