bagaimana cara mengatur expires cache/ cache browser untuk website supaya loadingnya cepat

Discussion in 'VPS (Virtual Private Server)' started by hanafy khotob, 21 Aug 2015.

?

bagaimana cara mengatur expires cache/ cache browser untuk website supaya loadingnya cepat

  1. 10

    0 vote(s)
    0.0%
  2. 20

    0 vote(s)
    0.0%
Multiple votes are allowed.
Thread Status:
Not open for further replies.
  1. hanafy khotob

    hanafy khotob Beginner 2.0

    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    mohon bantuannya Tuan
    cara setting expires cache di vps/webpanel webuzo
    saya menggunakan server nginx.
    karena loading website saya menjadi lambat karena tidak mengaktifkan expires cache
    jadi bagaimana cara mengajtifkannya ?
     
  2. junior riau

    junior riau Hosting Guru Web Hosting

    Messages:
    3,230
    Likes Received:
    515
    Trophy Points:
    113
    pakai cloudflare aja pak, ada pengaturannya
     
  3. hanafy khotob

    hanafy khotob Beginner 2.0

    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    apakah itu bisa ?
    apakah ada efek negatifnya ?
    maaf, saya masih baru menggunakan vps :)
     
  4. junior riau

    junior riau Hosting Guru Web Hosting

    Messages:
    3,230
    Likes Received:
    515
    Trophy Points:
    113
    sejauh ini malah efek positif yang ada, di cloudflare itu ada pengaturan cache mau expired sebulan semingu, sehari, 3 hari, 1 jam
    dari vpsnya standar aja yang ngatur cache dari cloudflare
     
  5. hanafy khotob

    hanafy khotob Beginner 2.0

    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    jadi pengaturan cache browsernya dari cloudfree ya pak
    bukan dari server kita ya
     
  6. mustafaramadhan

    mustafaramadhan Hosting Guru

    Messages:
    3,237
    Likes Received:
    857
    Trophy Points:
    113
    Pengaturan cache di nginx agak ribet.
     
  7. hanafy khotob

    hanafy khotob Beginner 2.0

    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    itu yang membuat saya jad pusing :D
    jadi bagaimana solusinya menurt bpak ?
    apakah memakai cloudflare ?
     
  8. mustafaramadhan

    mustafaramadhan Hosting Guru

    Messages:
    3,237
    Likes Received:
    857
    Trophy Points:
    113
    Celakanya saya tidak suka cloudflare.

    Secara prinsip anda perlu declare (seperti yang dipakai oleh Kloxo-MR):
    Code:
    http {
    ...
        ## jika pakai nginx-proxy
        proxy_cache_path /var/cache/nginx-proxy levels=1:2 keys_zone=pcache:8m max_size=100m inactive=600m;
        proxy_temp_path /tmp/nginx 1 2;
    
        ## jika pakai nginx standalone
        fastcgi_cache_path /var/cache/nginx-fastcgi levels=1:2 keys_zone=fcache:8m max_size=100m inactive=600m;
        fastcgi_temp_path /tmp/nginx 1 2;
    ...
    }
    
    server {
        ...
        ## jika pakai nginx standalone; di-set untuk microcache; ubah 10s ke nilai lebih tinggi untuk cache 'biasa'
        fastcgi_cache_valid 200 10s;
        fastcgi_cache_use_stale updating;
        fastcgi_max_temp_file_size 1M;
    
        location / {
            ...
            ## jika pakai nginx-proxy
            proxy_cache_valid 200 10s;
            proxy_cache_use_stale updating;
            proxy_max_temp_file_size 1M;
            ...
        }
        ...
    }
     
  9. hanafy khotob

    hanafy khotob Beginner 2.0

    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    apakah dampak pada vps kita jika memakai cloudflare ?
     
  10. cLeo

    cLeo Poster 1.0

    Messages:
    53
    Likes Received:
    7
    Trophy Points:
    8
    sama mas, saya juga gk suka cloudflare, kecuali untuk dns doang :D

     
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...