upgraded bootstrap, fixed style, added share blacklisting
This commit is contained in:
parent
85f93bae69
commit
3fb1cfc17d
37 changed files with 811 additions and 892 deletions
6
pkg/cache/cache.go
vendored
6
pkg/cache/cache.go
vendored
|
|
@ -34,11 +34,13 @@ func (c *Cache) Add(title string, p *core.Page) {
|
|||
c.Cache[title] = &CachedPage{p, now}
|
||||
}
|
||||
|
||||
func (c *Cache) Get(title string) *core.Page {
|
||||
func (c *Cache) Get(title string) (p *core.Page) {
|
||||
c.RLock()
|
||||
defer c.RUnlock()
|
||||
if cp, ok := c.Cache[title]; ok {
|
||||
return cp.Page
|
||||
p = new(core.Page)
|
||||
*p = *cp.Page
|
||||
return
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue