Answer the question
In order to leave comments, you need to log in
Why is the speed low when uploading through a caching server (proxy_cache)?
Hello everyone, I put a new server as a cache. The caching server must cache video from a file server located in the same DC. Here is the cache config:
proxy_cache_path /var/www/cache levels=1:2 keys_zona=ssd_cache:100m max_size=150G use_temp_path=off;
proxy_cache_key "$uri";
server {
listen 80 default;
root /var/www/;
location ~* \.mp4 {
proxy_cache ssd_cache;
proxy_cache_valie 200 3h;
proxy_cache_methods GET;
proxy_pass https://backen (Скрыл адрес сайта)
}
}
Answer the question
In order to leave comments, you need to log in
1. var - sets the scope of the variable, if you tempScrollTop = currentScrollTop;
specify var before the line , then the next time the function is called, the previous value is not saved in the variable.
2. Because tempScrollTop needs to be remembered at the end, so that the next time the function is called on an event, it will be compared with the previous value, and not with the current one.
3. In the second option, the variable is initialized with a value equal to 0
You now have a choice - between what is easy and what is right.
It's easy to keep making random modifications to the code, then trying to understand their meaning, and failing to do this (which is not surprising) to run for help.
That's right - this is to forget about the existence of jQuery for the next couple of months and start learning the language. From zero - because your knowledge of javascript can be safely rounded up to this value.
\.mp4 Excuse me, but what is this interesting file? Are you sure what exactly you wanted to cache?
one single file .mp4
- ???
And this is how the mask for all files ending in mp4 would look
like~* ^.+\.(mp4|mp3)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question