mirror of
https://github.com/wahyd4/Libr.git
synced 2026-08-25 04:36:47 +10:00
try to enable cache in heroku
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require jquery_ujs
|
||||
|
||||
@@ -5,11 +5,11 @@ Libr::Application.configure do
|
||||
config.cache_classes = true
|
||||
|
||||
# Full error reports are disabled and caching is turned on
|
||||
config.consider_all_requests_local = false
|
||||
config.consider_all_requests_local = false
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
# Disable Rails's static asset server (Apache or nginx will already do this)
|
||||
config.serve_static_assets = false
|
||||
config.serve_static_assets = true
|
||||
|
||||
# Compress JavaScripts and CSS
|
||||
config.assets.compress = true
|
||||
@@ -67,25 +67,16 @@ Libr::Application.configure do
|
||||
# with SQLite, MySQL, and PostgreSQL)
|
||||
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
||||
|
||||
config.assets.precompile << '*.js'
|
||||
config.assets.precompile << '*.css'
|
||||
config.assets.precompile += '*.js'
|
||||
config.assets.precompile += '*.css'
|
||||
|
||||
config.eager_load = true
|
||||
|
||||
client = Dalli::Client.new(ENV["MEMCACHIER_SERVERS"],
|
||||
:value_max_bytes => 10485760)
|
||||
client = Dalli::Client.new(ENV["MEMCACHIER_SERVERS"], :value_max_bytes => 10485760)
|
||||
config.action_dispatch.rack_cache = {
|
||||
:metastore => client,
|
||||
:entitystore => client
|
||||
:metastore => client,
|
||||
:entitystore => client
|
||||
}
|
||||
config.static_cache_control = "public, max-age=2592000"
|
||||
|
||||
config.serve_static_assets = true
|
||||
|
||||
config.static_cache_control = "public, max-age=2592000"
|
||||
|
||||
config.assets.digest = true
|
||||
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
end
|
||||
|
||||
@@ -1,161 +0,0 @@
|
||||
body {
|
||||
padding-top: 60px;
|
||||
padding-bottom: 20px;
|
||||
text-shadow: white 0 1px 0;
|
||||
font-weight: 100;
|
||||
font: 10pt/1.6em Avenir, Lucida Grande, Calibri, Trebuchet MS, Helvetica, Arial, Hiragino Sans GB, WenQuanYi Micro Hei, STHeiti, Microsoft Jhenghei, Nanum Gothic, sans-serif;
|
||||
}
|
||||
|
||||
.main {
|
||||
min-height: 600px;
|
||||
}
|
||||
|
||||
#footer {
|
||||
|
||||
bottom: 0;
|
||||
background-color: whiteSmoke;
|
||||
height: 60px;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
p.title {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
div.span2 {
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.cover {
|
||||
position: relative;
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
|
||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
|
||||
}
|
||||
|
||||
.cover:before, .cover:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
-webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
|
||||
-moz-box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
|
||||
top: 10px;
|
||||
bottom: 10px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
-moz-border-radius: 100px / 10px;
|
||||
border-radius: 100px / 10px;
|
||||
}
|
||||
|
||||
.cover:after {
|
||||
right: 10px;
|
||||
left: auto;
|
||||
-webkit-transform: skew(8deg) rotate(3deg);
|
||||
-moz-transform: skew(8deg) rotate(3deg);
|
||||
-ms-transform: skew(8deg) rotate(3deg);
|
||||
-o-transform: skew(8deg) rotate(3deg);
|
||||
transform: skew(8deg) rotate(3deg);
|
||||
}
|
||||
|
||||
.cover:hover {
|
||||
box-shadow: 3px 3px 12px #999;
|
||||
}
|
||||
|
||||
.book-name {
|
||||
font-color: #5A5A5A;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.rent-record {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.one-item {
|
||||
width: 170px;
|
||||
margin-left: 10px;
|
||||
float: left;
|
||||
height: 180px;
|
||||
margin-bottom: 0.9em;
|
||||
text-align: center;
|
||||
margin-top: 0.9em;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
float: left;
|
||||
margin: 0;
|
||||
display: block;
|
||||
|
||||
}
|
||||
|
||||
.my-label {
|
||||
float: left;
|
||||
margin-left: 4px;
|
||||
margin-bottom: 4px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.my-borrow-btn {
|
||||
margin-top: -20px;
|
||||
}
|
||||
|
||||
.container-narrow {
|
||||
margin: 30px auto 0 auto;
|
||||
max-width: 700px;
|
||||
min-height: 500px;
|
||||
border: 1px solid #9EAA99;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 0 4px rgba(0, 0, 0, .25);
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.cool-border {
|
||||
border: 1px solid #9EAA99;
|
||||
box-shadow: 0 0 4px rgba(0, 0, 0, .25);
|
||||
}
|
||||
|
||||
.record-info {
|
||||
color: #c67605;
|
||||
font-size: 25px;
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
form button.boxclose {
|
||||
float: right;
|
||||
margin-top: -10px;
|
||||
margin-left: -30px;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
border: 1px solid #AEAEAE;
|
||||
border-radius: 30px;
|
||||
background: #605F61;
|
||||
font-size: 31px;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
line-height: 0px;
|
||||
padding: 11px 2px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.edit-user {
|
||||
width: 450px;
|
||||
text-align: center;
|
||||
margin: 0 0 0 40px;
|
||||
}
|
||||
|
||||
select {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
|
||||
.borrow-btn{
|
||||
margin: -0.79em 0 0 0.7em;
|
||||
}
|
||||
.a-record span{
|
||||
margin-right: 20px;
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 921 B |
@@ -1 +0,0 @@
|
||||
{"files":{"douban-2fcd299d2f4c8bbf4bd0a919632224f4.png":{"logical_path":"douban.png","mtime":"2013-04-16T23:40:27+08:00","size":921,"digest":"2fcd299d2f4c8bbf4bd0a919632224f4"},"qq_login-738a19206c58bc22ba3927f26b820fa3.png":{"logical_path":"qq_login.png","mtime":"2013-04-16T23:40:27+08:00","size":7406,"digest":"738a19206c58bc22ba3927f26b820fa3"},"rails-4c94998172307d81407ed7b88dc57530.png":{"logical_path":"rails.png","mtime":"2013-04-16T23:40:27+08:00","size":6646,"digest":"4c94998172307d81407ed7b88dc57530"},"weibo-697fd54134be3168cbbc916fffefa112.png":{"logical_path":"weibo.png","mtime":"2013-04-16T23:40:27+08:00","size":10447,"digest":"697fd54134be3168cbbc916fffefa112"},"application-6099eacd230a204911e9ff5535c1522b.js":{"logical_path":"application.js","mtime":"2013-07-19T21:55:38+08:00","size":288679,"digest":"6099eacd230a204911e9ff5535c1522b"},"application-4206f6880c49062f142e2bb25d7647ce.css":{"logical_path":"application.css","mtime":"2013-04-16T23:40:27+08:00","size":2995,"digest":"4206f6880c49062f142e2bb25d7647ce"}},"assets":{"douban.png":"douban-2fcd299d2f4c8bbf4bd0a919632224f4.png","qq_login.png":"qq_login-738a19206c58bc22ba3927f26b820fa3.png","rails.png":"rails-4c94998172307d81407ed7b88dc57530.png","weibo.png":"weibo-697fd54134be3168cbbc916fffefa112.png","application.js":"application-6099eacd230a204911e9ff5535c1522b.js","application.css":"application-4206f6880c49062f142e2bb25d7647ce.css"}}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
Reference in New Issue
Block a user