diff --git a/CHANGELOG b/CHANGELOG index 328fea3..2a79211 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ Revision history for Lufi - Use Mojo::SQLite instead of ORLite - Use FiatTux plugins - Option to force "Burn after reading" for each uploaded file + - Use GzipStatic and StaticCache plugins for speed 0.02.2 2017-09-18 - Fix cron tasks bug diff --git a/cpanfile b/cpanfile index b519fdf..96ef475 100644 --- a/cpanfile +++ b/cpanfile @@ -3,6 +3,8 @@ requires 'Mojolicious', '>= 7.31'; requires 'Mojolicious::Plugin::DebugDumperHelper'; requires 'Mojolicious::Plugin::I18N'; requires 'Mojolicious::Plugin::Mail'; +requires 'Mojolicious::Plugin::GzipStatic'; +requires 'Mojolicious::Plugin::StaticCache'; requires 'Mojolicious::Plugin::FiatTux::Helpers', '== 0.01', url => 'https://framagit.org/luc/mojolicious-plugin-fiattux-helpers/-/archive/0.01/mojolicious-plugin-fiattux-helpers-0.01.tar.gz'; requires 'Mojolicious::Plugin::FiatTux::GrantAccess', '== 0.05', url => 'https://framagit.org/luc/mojolicious-plugin-fiattux-grantaccess/-/archive/0.05/mojolicious-plugin-fiattux-grantaccess-0.05.tar.gz'; requires 'EV'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 7c983f9..e5411ee 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1032,6 +1032,14 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Mojolicious 6.11 + Mojolicious-Plugin-GzipStatic-0.04 + pathname: L/LD/LDIDRY/Mojolicious-Plugin-GzipStatic-0.04.tar.gz + provides: + Mojolicious::Plugin::GzipStatic 0.04 + requirements: + ExtUtils::MakeMaker 0 + IO::Compress::Gzip 0 + Mojolicious 7.75 Mojolicious-Plugin-I18N-1.6 pathname: S/SH/SHARIFULN/Mojolicious-Plugin-I18N-1.6.tar.gz provides: @@ -1060,6 +1068,13 @@ DISTRIBUTIONS requirements: ExtUtils::MakeMaker 0 Mojolicious 7.23 + Mojolicious-Plugin-StaticCache-0.02 + pathname: L/LD/LDIDRY/Mojolicious-Plugin-StaticCache-0.02.tar.gz + provides: + Mojolicious::Plugin::StaticCache 0.02 + requirements: + ExtUtils::MakeMaker 0 + Mojolicious 7.33 Moo-2.003004 pathname: H/HA/HAARG/Moo-2.003004.tar.gz provides: diff --git a/lib/Lufi.pm b/lib/Lufi.pm index 1cf7437..3270ae4 100644 --- a/lib/Lufi.pm +++ b/lib/Lufi.pm @@ -67,6 +67,12 @@ sub startup { # Debug $self->plugin('DebugDumperHelper'); + # Compress static assets + $self->plugin('GzipStatic'); + + # Cache static assets + $self->plugin('StaticCache'); + # Fiat Tux helpers $self->plugin('FiatTux::Helpers'); diff --git a/lib/Mounter.pm b/lib/Mounter.pm index ab5b097..fd636ff 100644 --- a/lib/Mounter.pm +++ b/lib/Mounter.pm @@ -46,6 +46,12 @@ sub startup { } ); + # Compress static assets + $self->plugin('GzipStatic'); + + # Cache static assets + $self->plugin('StaticCache'); + # Helpers $self->plugin('Lufi::Plugin::Helpers'); diff --git a/themes/default/lib/Lufi/I18N/ca.po b/themes/default/lib/Lufi/I18N/ca.po index 17b72ae..a7de962 100644 --- a/themes/default/lib/Lufi/I18N/ca.po +++ b/themes/default/lib/Lufi/I18N/ca.po @@ -308,7 +308,7 @@ msgstr "Si us plau contacteu amb l'administrador: %1" msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "Si us plau, espereu mentre obtenim el fitxer. Abans que el tingueu disponible primer cal descarregar i desxifrar tots els trossos." -#: lib/Lufi.pm:137 +#: lib/Lufi.pm:143 msgid "Please, check your credentials: unable to authenticate." msgstr "" @@ -349,7 +349,7 @@ msgstr "Compartiu fitxers amb total privacitat a %1" msgid "Signin" msgstr "Autenticació" -#: lib/Lufi.pm:140 +#: lib/Lufi.pm:146 msgid "Sorry mate, you are not authorised to use that service. Contact your sysadmin if you think there's a glitch in the matrix." msgstr "" diff --git a/themes/default/lib/Lufi/I18N/en.po b/themes/default/lib/Lufi/I18N/en.po index d9f5822..a2ca174 100644 --- a/themes/default/lib/Lufi/I18N/en.po +++ b/themes/default/lib/Lufi/I18N/en.po @@ -304,7 +304,7 @@ msgstr "" msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "" -#: lib/Lufi.pm:137 +#: lib/Lufi.pm:143 msgid "Please, check your credentials: unable to authenticate." msgstr "" @@ -345,7 +345,7 @@ msgstr "" msgid "Signin" msgstr "" -#: lib/Lufi.pm:140 +#: lib/Lufi.pm:146 msgid "Sorry mate, you are not authorised to use that service. Contact your sysadmin if you think there's a glitch in the matrix." msgstr "" diff --git a/themes/default/lib/Lufi/I18N/fr.po b/themes/default/lib/Lufi/I18N/fr.po index 647312f..96da5a4 100644 --- a/themes/default/lib/Lufi/I18N/fr.po +++ b/themes/default/lib/Lufi/I18N/fr.po @@ -306,7 +306,7 @@ msgstr "Veuillez contacter l’administrateur : %1" msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "Veuillez patientez pendant la récupération de votre fichier. Nous devons d’abord récupérer et déchiffrer tous les fragments avant que vous puissiez le télécharger." -#: lib/Lufi.pm:137 +#: lib/Lufi.pm:143 msgid "Please, check your credentials: unable to authenticate." msgstr "Veuillez vérifier vos identifiants : impossible de vous authentifier." @@ -347,7 +347,7 @@ msgstr "Partagez vos fichiers en toute confidentialité sur %1" msgid "Signin" msgstr "Connexion" -#: lib/Lufi.pm:140 +#: lib/Lufi.pm:146 msgid "Sorry mate, you are not authorised to use that service. Contact your sysadmin if you think there's a glitch in the matrix." msgstr "Désolé, vous n’êtes pas autorisé à utiliser ce service. Contactez votre administrateur si vous pensez qu’il s’agit d’une erreur." diff --git a/themes/default/lib/Lufi/I18N/it.po b/themes/default/lib/Lufi/I18N/it.po index 7502567..445a764 100644 --- a/themes/default/lib/Lufi/I18N/it.po +++ b/themes/default/lib/Lufi/I18N/it.po @@ -306,7 +306,7 @@ msgstr "Contattare l'amministratore : %1" msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "Attendere mentre otteniamo il vostro file. Dobbiamo prima scaricare e decifrare tutte le parti prima che possiate averlo." -#: lib/Lufi.pm:137 +#: lib/Lufi.pm:143 msgid "Please, check your credentials: unable to authenticate." msgstr "" @@ -351,7 +351,7 @@ msgstr "Condividi tutti i file in totale riservatezza su %1" msgid "Signin" msgstr "Autenticazione" -#: lib/Lufi.pm:140 +#: lib/Lufi.pm:146 msgid "Sorry mate, you are not authorised to use that service. Contact your sysadmin if you think there's a glitch in the matrix." msgstr "" diff --git a/themes/default/lib/Lufi/I18N/nl.po b/themes/default/lib/Lufi/I18N/nl.po index 08394a3..de9e67d 100644 --- a/themes/default/lib/Lufi/I18N/nl.po +++ b/themes/default/lib/Lufi/I18N/nl.po @@ -293,7 +293,7 @@ msgstr "Neem contact op met administrator: %1" msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "Een ogenblik geduld, we pakken je bestand er bij. We moeten alle delen downloaden en decrypten voordat je het kan downloaden." -#: lib/Lufi.pm:137 +#: lib/Lufi.pm:143 msgid "Please, check your credentials: unable to authenticate." msgstr "" @@ -338,7 +338,7 @@ msgstr "Deel je bestanden met volledige privacy op %1" msgid "Signin" msgstr "Inloggen" -#: lib/Lufi.pm:140 +#: lib/Lufi.pm:146 msgid "Sorry mate, you are not authorised to use that service. Contact your sysadmin if you think there's a glitch in the matrix." msgstr "" diff --git a/themes/default/lib/Lufi/I18N/oc.po b/themes/default/lib/Lufi/I18N/oc.po index e6ca54f..5be5dff 100644 --- a/themes/default/lib/Lufi/I18N/oc.po +++ b/themes/default/lib/Lufi/I18N/oc.po @@ -306,7 +306,7 @@ msgstr "Mercés de contactar l’administrator : %1" msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "Mercés d’esperar pendent la recuperacion de vòstre fichièr. Nos cal d’en primièr recuperar e deschifrar totes los fragaments abans que poscatz o telecargar." -#: lib/Lufi.pm:137 +#: lib/Lufi.pm:143 msgid "Please, check your credentials: unable to authenticate." msgstr "Mercés de verificar vòstres identificants : impossible de vos autentificar." @@ -347,7 +347,7 @@ msgstr "Partejatz vòstres fichièrs en tota confidencialitat sus %1" msgid "Signin" msgstr "Connexion" -#: lib/Lufi.pm:140 +#: lib/Lufi.pm:146 msgid "Sorry mate, you are not authorised to use that service. Contact your sysadmin if you think there's a glitch in the matrix." msgstr "O planhèm collèga, sètz pas autorizat a utilizar aqueste servici. Contactatz vòstre administrator sistèma se pensatz que i a un problèma." diff --git a/themes/default/lib/Lufi/I18N/pt.po b/themes/default/lib/Lufi/I18N/pt.po index 26d3663..b466d49 100644 --- a/themes/default/lib/Lufi/I18N/pt.po +++ b/themes/default/lib/Lufi/I18N/pt.po @@ -315,7 +315,7 @@ msgstr "Contacte o administrador: %1" msgid "Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it." msgstr "Por favor aguarde durante a recuperação do seu ficheiro. Primeiro devemos recuperar e descodificar todos os fragmentos e depois poderá descarregar o ficheiro." -#: lib/Lufi.pm:137 +#: lib/Lufi.pm:143 msgid "Please, check your credentials: unable to authenticate." msgstr "" @@ -356,7 +356,7 @@ msgstr "Partilhe os seus ficheiros com toda a privacidade em %1" msgid "Signin" msgstr "Conexão" -#: lib/Lufi.pm:140 +#: lib/Lufi.pm:146 msgid "Sorry mate, you are not authorised to use that service. Contact your sysadmin if you think there's a glitch in the matrix." msgstr ""