cache

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AirlyPrefix = "airly-"
View Source
const DepsPrefix = "deps-"

Variables

View Source
var AirlyExpire = time.Minute * 10
View Source
var DepsExpire = time.Second * 15

Functions

func CacheAirly

func CacheAirly(c *redis.Client, airly *pb.Airly, installation *pb.Installation) (err error)

func CacheDepartures

func CacheDepartures(c *redis.Client, deps []pb.Departure, stop *pb.Stop) (err error)

func GetCachedAirly

func GetCachedAirly(c *redis.Client, installation *pb.Installation) (*pb.Airly, error)

func GetCachedDepartures

func GetCachedDepartures(c *redis.Client, stop *pb.Stop) (departures []pb.Departure, err error)

func IsAirlyCached

func IsAirlyCached(c *redis.Client, installation *pb.Installation) (cached bool, err error)

func IsDepartureCached

func IsDepartureCached(c *redis.Client, stop *pb.Stop) (cached bool, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL