cache.js
2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
'use strict';
const SECOND = 1;
const MINUTE = 60 * SECOND;
const DAY = 86400 * SECOND;
const cachePage = {
'/': 5 * MINUTE,
// 频道页
'/boys': 30 * SECOND,
'/girls': 30 * SECOND,
'/kids': 30 * SECOND,
'/lifestyle': 30 * SECOND,
// 自定义频道
'/channel/:id.html': 1 * MINUTE,
// ajax获取频道页楼层
'/channel/getResourceContent': 30 * MINUTE,
// 商品分类
'/cate': 5 * MINUTE,
// 商品详情页
'/product/\\/pro_([\\d]+)_([\\d]+)\\/(.*)/': 30 * MINUTE,
'/product/\\/show_([\\d]+)/': 30 * MINUTE,
// 商品详情ajax
// 店铺推荐
'/product/detail/preference': 5 * MINUTE,
'/product/detail/intro/:productskn': 15 * MINUTE,
// 店铺人气单品
'/product/new/shop/hotlist': 5 * MINUTE,
// 店铺简介
'/product/index/intro': 15 * MINUTE,
// 逛
'/guang/': 1 * MINUTE,
'/guang/info/index': 10 * MINUTE,
'/guang/author/index': 1 * MINUTE,
'/guang/tags/index': 1 * MINUTE,
'/guang/plustar': 1 * MINUTE,
'/guang/plustar/brandinfo': 1 * MINUTE,
'/guang/plusstar': 1 * MINUTE,
'/guang/plusstar/resources-goodsList': 1 * MINUTE,
'/guang/index/page': 1 * MINUTE,
// '/guang/plustar/brandinfo': 1 * MINUTE,
'/guang/star': 1 * MINUTE,
// 领券中心
'/activity/coupon/floor': 1 * MINUTE,
// 商品列表
// '/product/search/filter': 1 * MINUTE, // 不能缓存,有跨域问题
/* 筛选默认须要添加uid参数
'/product/list/index': 1 * MINUTE,
'/product/index/index': 1 * MINUTE,
'/product/index/brand': 1 * MINUTE,
'/product/shop': 1 * MINUTE,
'/product/search/search': 1 * MINUTE,
*/
'/product/new': 1 * MINUTE,
// 秒杀列表
'/product/seckill': 30 * SECOND,
'/product/seckill/list': 30 * SECOND,
// 秒杀详情
'/product/^\\/seckill\\/pro_([\\d]+)_([\\d]+)/': 30 * MINUTE,
'/product/^\\/seckill\\/show_([\\d]+)/': 30 * MINUTE,
// sale
'/product/sale': 5 * MINUTE,
'/product/sale/discount': 5 * MINUTE,
'/product/sale/vip': 5 * MINUTE,
'/product/sale/breakingYards': 5 * MINUTE,
'/product/sale/discount/detail': 5 * MINUTE,
// 奥莱
'/product/outlet': 30 * SECOND,
'/product/outlet/activity': 1 * MINUTE,
// 品牌一览
'/brands': 5 * MINUTE,
'/brands/search': 1 * MINUTE,
// 直播活动
'/activity/live': 1 * MINUTE,
// 单品日
'/activity/single-day': 1 * MINUTE,
'/activity/single-day/getSingleData': 30 * SECOND,
'/activity/single-day/getProductData': 30 * SECOND,
// 店铺收藏
'/activity/shopCollect': 1 * MINUTE,
'/activity/shopNav': 30 * SECOND,
// 关键词页面
'/product/search/so/:query.html': 7 * DAY,
'/product/search/chanpin/:id.html': 7 * DAY
};
module.exports = cachePage;