Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ branches:
- grails3
- pivotal
- grails2
- ala-bootstrap3-20
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}
}

version "3.2.2"
version "3.2.3-SNAPSHOT"
group "org.grails.plugins"

apply plugin:"eclipse"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,15 @@ class HeaderFooterTagLib {
* @return
*/
String load(which, attrs) {
def content
if (hfCache[which].content == "" || (new Date().time > hfCache[which].timestamp + cacheTimeout)) {
content = getContent(which)
hfCache[which].content = content
hfCache[which].timestamp = new Date().time
} else {
content = hfCache[which].content
String newContent
String content = hfCache[which].content
if (content == "" || (new Date().time > hfCache[which].timestamp + cacheTimeout)) {
newContent = getContent(which)
if (newContent) {
hfCache[which].content = newContent
hfCache[which].timestamp = new Date().time
content = newContent
}
}
return transform(content, attrs)
}
Expand All @@ -154,8 +156,6 @@ class HeaderFooterTagLib {
* @return
*/
String getContent(which) {


def url = headerAndFooterBaseURL + '/' + which + ".html" // Bootstrap versions
def conn = new URL(url).openConnection()
try {
Expand Down