Blame view

config/cache.js 1.67 KB
姜枫 authored
1 2 3 4 5

'use strict';

const SECOND = 1;
const MINUTE = 60 * SECOND;
周少峰 authored
6
const DAY = 86400 * SECOND;
姜枫 authored
7 8 9 10

const cachePage = {

    // 频道页
姜枫 authored
11
    '/': 30 * SECOND,
htoooth authored
12 13 14 15
    '/woman/': 30 * SECOND,
    '/girls/': 30 * SECOND,
    '/kids/': 30 * SECOND,
    '/lifestyle/': 30 * SECOND,
姜枫 authored
16 17

    // 商品详情页
周少峰 authored
18
    '/product/^\\/([\\d]+)(.*)/': 5 * MINUTE,
姜枫 authored
19 20

    // 逛
郝肖肖 authored
21
    '/guang/': 10 * MINUTE,
22 23
    '/guang/info/detailData': 10 * MINUTE,
    '/guang/^\\/([\\d]+)(.*)/': 10 * MINUTE,
姜枫 authored
24
    '/guang/detail/:id': 10 * MINUTE,
刘传洋 authored
25
    '/guang/Index/editor': 1 * MINUTE,
姜枫 authored
26 27 28
    '/guang/tags/index': 1 * MINUTE,

    // 领券中心
周少峰 authored
29
    '/coupon/': 5 * MINUTE,
姜枫 authored
30 31

    // 商品列表
周少峰 authored
32 33
    '/product/list/index': 10 * MINUTE,
    '/product/index/index': 10 * MINUTE,
姜枫 authored
34 35 36 37 38 39 40

    // 秒杀列表
    '/product/seckill': 30 * SECOND,

    // 秒杀详情

    // sale
郝肖肖 authored
41
    '/product/\\/(.*)-sale/': 5 * MINUTE,
姜枫 authored
42 43 44 45 46
    '/product/sale': 5 * MINUTE,
    '/product/sale/vip': 5 * MINUTE,
    '/product/sale/breakingYards': 5 * MINUTE,
    '/product/sale/newSale': 5 * MINUTE,
    '/product/sale/discount/detail': 5 * MINUTE,
姜枫 authored
47
    '/product/sale/special/detail': 5 * MINUTE,
姜枫 authored
48 49 50

    '/product/outlet': 30 * SECOND,
51
    '/product/index/brand': 5 * MINUTE,
姜枫 authored
52
    '/product/index/about': 10 * MINUTE,
53 54

    '/product/shoplist': 5 * MINUTE,
htoooth authored
55
    '/product/shop': 30 * MINUTE, // 店铺首页
姜枫 authored
56 57 58 59

    '/product/list/new': 30 * SECOND,

    // 品牌一览
60
    '/brands': 5 * MINUTE,
郝肖肖 authored
61
    '/\\/(boys|girls|kids|lifestyle)-brands(\\/)?$/': 5 * MINUTE,
姜枫 authored
62 63
    '/brands/plusstar': 5 * MINUTE,
周少峰 authored
64
    '/^\\/special\\/(\\d+)_(.*)\\.html$/': 5 * MINUTE,
htoooth authored
65
    '/product/search/keyword/:id': 7 * DAY,
66
郝肖肖 authored
67
    // 帮助
周少峰 authored
68 69
    '/help/': 1 * DAY,
    '/help/detail': 1 * DAY,
姜枫 authored
70 71 72
};

module.exports = cachePage;