Comments (5)
@Bronislawsky It is something that I've thought about since the beginning, however I'm not sure what the best approach would be. Obviously yes, including every single common URI slug in dozens of languages by default would not be very manageable.
So yah, probably it would need a variable in ss-config
for custom slugs to skip cache.
That said, I'd also love to be able to popularize certain URIs (spellings) for commonality/SEO... I'm not a fan of needlessly complex slugs like shopping-cart
instead of just cart
etc.
from slickstack.
suggestion:
ask about language in the installer script and link it to a file in your repository. everybody who needs a language should contribute the file with the correct translations.
Workaround for not yet accepted contributions: set own URL or path to language files in the ss-config
example file: "de_DE.txt"
cart="warenkorb"
account="mein-konto"
checkout="checkout"
contact="kontakt"
.....
this is just an example, i don't have the correct slugs in my head right now.
another, easier, way would be to set the initial exclusions in english, then get the current values of woocommerce on each ss-update.
this way the user would not need to install everything a second time after reading his config and writing the file.
but i guess this would involve more coding
from slickstack.
In french, we use panier instead of cart etc,
Is it a possibility to eventually add multilang support or a custom skip cache options for
other language than English ?
can you please insert the correct values here @Bronislawsky and i will add them to my fork. they may get pulled to this repo
## FRENCH - sensitive wordpress urls should always skip the cache
if ($request_uri ~* "index.php|/account.*|/cart.*|/checkout.*|/contact.*|/dashboard.*|/login.*|/my-.*|/order.*|/profile.*|/register.*|/settings.*|/view.*|/wc-api.*|/wp-admin.*|wp-.*.php") {
set $skip_cache 1;
}
from slickstack.
As an aside, I mentioned this on the Pull Request but to begin considering support for 100 languages we should probably move the skip cache rules into a new Nginx module instead like:
/etc/nginx/conf.d/skip-cache.conf
... or something where users only install the skip cache rules for one language.
Ref: #141
from slickstack.
I don't know yet how to implement, but here's an example file:
https://github.com/littlebizzy/slickstack/blob/master/modules/nginx/languages/en_us.txt
By separating files like this, it makes it easier for users to contribute spelling fixes and other patches. And, it means each SlickStack server only needs to install the languages that they will use.
from slickstack.
Related Issues (20)
- Auto restart MySQL service if it went down HOT 2
- MySQL and/or Redis crashing sometimes on Ubuntu 20.04 HOT 4
- Consider replacing Nginx with Caddy HOT 7
- Exiting ss-update-config: There is a version mismatch between this script and public mirrors.. HOT 1
- Migration slickstack between VPS to VPS HOT 1
- change php version and Install ioncube loader HOT 4
- Install freeze on Running ss-install-redis-packages... HOT 3
- Website very slow loading inside apps ios HOT 3
- CERT_AUTHORITY_INVALID After install HOT 1
- SUDO_USER and SFTP_USER validation check to avoid conflicts? HOT 2
- Perform custom tasks during certain SlickStack scripts HOT 1
- Invalid user mysql:mysql error when using remote database HOT 1
- Ensure more privacy for openssl cert generation. HOT 11
- SS_ADMINER_PUBLIC="false" does not work as intended. HOT 9
- Allow tuning of PHP8 JIT settings (opcache.jit options in php.ini) HOT 4
- Cloudflare real visitor IP support in Nginx config HOT 18
- Option to allow only Cloudflare IPs to connect to origin server HOT 2
- OpenVZ PHP-FPM "Unable to set priority for the master process: Permission denied" HOT 9
- Support for custom Permissions Policy HTTP header in Nginx HOT 6
- Improve WP-Cron robustness for Multisite environments HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slickstack.