Skip to content

Commit 73a18a3

Browse files
Merge pull request mudbugmedia#12 from mudbugmedia/set-expires-in
Set expires in
2 parents a721db2 + 1cda58a commit 73a18a3

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ A simple example using loadcss-rails looks like:
7474
<script>
7575
loadCSS("<%= stylesheet_path('application') %>");
7676
</script>
77+
<link rel="preload" href="<%= stylesheet_path('application') %>" as="style" onload="this.rel='stylesheet'">
7778
<noscript>
78-
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
79+
<link rel="stylesheet" href="<%= stylesheet_path('application') %>">
7980
</noscript>
8081
```
8182

lib/critical-path-css-rails.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module CriticalPathCss
55

66
def self.generate
77
CssFetcher.new.fetch.each do |route, css|
8-
Rails.cache.write(route, css, namespace: CACHE_NAMESPACE)
8+
Rails.cache.write(route, css, namespace: CACHE_NAMESPACE, expires_in: nil)
99
end
1010
end
1111

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module CriticalPathCSS
22
module Rails
3-
VERSION = '0.2.3'
3+
VERSION = '0.2.4'
44
PENTHOUSE_VERSION = '0.3.4'
55
end
66
end

0 commit comments

Comments
 (0)