Skip to content

Instantly share code, notes, and snippets.

package main
import (
"encoding/base64"
"net/http"
"net/http/httputil"
"github.com/astaxie/beego"
"github.com/astaxie/beego/context"
)
package main
import (
"encoding/base64"
"net/http"
"net/http/httputil"
"github.com/gin-gonic/gin"
)
@simon-cj
simon-cj / main.go
Created August 9, 2019 08:54 — forked from zupzup/main.go
Go TCP Proxy / Port Forwarding Example (https://zupzup.org/go-port-forwarding/)
package main
import (
"flag"
"fmt"
"io"
"log"
"net"
"os"
"os/signal"

Flask-SQLAlchemy Caching

The following gist is an extract of the article Flask-SQLAlchemy Caching. It allows automated simple cache query and invalidation of cache relations through event among other features.

Usage

retrieve one object

# pulling one User object

user = User.query.get(1)