From b58e21a525e7e4aeda3ec51bfcb07390af8be465 Mon Sep 17 00:00:00 2001 From: Horus3 Date: Sat, 21 Feb 2015 14:50:00 +0100 Subject: Index page is now cached. --- app/test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'app/test.go') diff --git a/app/test.go b/app/test.go index 0b56fae..3cd71bc 100644 --- a/app/test.go +++ b/app/test.go @@ -1,6 +1,23 @@ package main +import ( +//"encoding/json" +) + func insertHost() { h := Host{Url: "https://mx.iamfabulous.de/", Monitored: true, Private: false} Db.Create(&h) + h = Host{Url: "https://iamfabulousadsfadfdsf.de/", Monitored: true, Private: false} + Db.Create(&h) + + c := pool.Get() + defer c.Close() + + /* + host := []Host{} + Db.Find(&host) + + js, _ := json.Marshal(host) + c.Do("SET", cache_prefix, js) + */ } -- cgit v1.2.3