-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upped the user cache capacity and topic cache capacity. More resource management work. WIP. Added Hyperdrive to the experimental folder. It doesn't really work right now, but I'd like to track it's progress. Eliminated a line in global.js
- Loading branch information
Showing
7 changed files
with
74 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Highly experimental plugin for caching rendered pages for guests | ||
package main | ||
|
||
import ( | ||
"sync/atomic" | ||
|
||
"./common" | ||
) | ||
|
||
var hyperPageCache *HyperPageCache | ||
|
||
func init() { | ||
common.Plugins.Add(&common.Plugin{UName: "hyperdrive", Name: "Hyperdrive", Author: "Azareal", Init: initHyperdrive, Deactivate: deactivateHyperdrive}) | ||
} | ||
|
||
func initHyperdrive() error { | ||
hyperPageCache = newHyperPageCache() | ||
common.Plugins["hyperdrive"].AddHook("somewhere", deactivateHyperdrive) | ||
return nil | ||
} | ||
|
||
func deactivateHyperdrive() { | ||
hyperPageCache = nil | ||
} | ||
|
||
type HyperPageCache struct { | ||
topicList atomic.Value | ||
} | ||
|
||
func newHyperPageCache() *HyperPageCache { | ||
pageCache := new(HyperPageCache) | ||
pageCache.topicList.Store([]byte("")) | ||
return pageCache | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters