Add "Blogs" | Prev Commit: Update to 8.2.1 | LevelDB-based session database implemented, Read HISTORY.md

Former-commit-id: 1b7b288c1cf1d400f229794a33f3c049054f341f
This commit is contained in:
kataras 2017-08-08 16:05:16 +03:00
parent 056f9a9415
commit 87d0f2e967
3 changed files with 3 additions and 5 deletions

View File

@ -45,6 +45,7 @@ Iris is a fast, simple and efficient micro web framework for Go. It provides a b
* [Middleware](middleware/)
* [Dockerize](https://github.com/iris-contrib/cloud-native-go)
* [Community & Support](#-community)
* [Blogs](http://iris-go.com/v8/blogs)
* [Versioning](#-version)
* [When should I upgrade?](#should-i-upgrade-my-iris)
* [Where can I find older versions?](#where-can-i-find-older-versions)

View File

@ -2,7 +2,6 @@ package leveldb
import (
"bytes"
"runtime"
"github.com/kataras/golog"
@ -59,7 +58,7 @@ func New(directoryPath string) (*Database, error) {
return NewFromDB(service)
}
// NewFromDB same as `New` but accepts an already-created custom boltdb connection instead.
// NewFromDB same as `New` but accepts an already-created custom leveldb connection instead.
func NewFromDB(service *leveldb.DB) (*Database, error) {
if service == nil {
return nil, errors.New("underline database is missing")
@ -153,7 +152,7 @@ func (db *Database) sync(p sessions.SyncPayload) {
if p.Action == sessions.ActionDestroy {
if err := db.destroy(bsid); err != nil {
golog.Errorf("error while destroying a session(%s) from boltdb: %v",
golog.Errorf("error while destroying a session(%s) from leveldb: %v",
p.SessionID, err)
}
return

View File

@ -11,8 +11,6 @@ const (
DefaultRedisAddr = "127.0.0.1:6379"
// DefaultRedisIdleTimeout the redis idle timeout option, time.Duration(5) * time.Minute
DefaultRedisIdleTimeout = time.Duration(5) * time.Minute
// DefaultRedisMaxAgeSeconds the redis storage last parameter (SETEX), 31556926.0 (1 year)
DefaultRedisMaxAgeSeconds = 31556926.0 //1 year
)
// Config the redis configuration used inside sessions