All Projects → melihmucuk → Geocache

melihmucuk / Geocache

Licence: mit
Geocache is an in-memory cache that is suitable for geolocation based applications.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Geocache

Cacache Rs
💩💵 but for your 🦀
Stars: ✭ 116 (-10.08%)
Mutual labels:  cache
Rudolfs
A high-performance, caching Git LFS server with an AWS S3 and local storage back-end.
Stars: ✭ 122 (-5.43%)
Mutual labels:  cache
Ppnetworkhelper
AFNetworking 3.x 与YYCache封装
Stars: ✭ 1,586 (+1129.46%)
Mutual labels:  cache
Netclient Ios
Versatile HTTP Networking in Swift
Stars: ✭ 117 (-9.3%)
Mutual labels:  cache
Guzzle Advanced Throttle
A Guzzle middleware that can throttle requests according to (multiple) defined rules. It is also possible to define a caching strategy, e.g. get the response from cache when the rate limit is exceeded or always get a cached value to spare your rate limits. Using wildcards in host names is also supported.
Stars: ✭ 120 (-6.98%)
Mutual labels:  cache
Dmusic
DMusic Player for Android - An online music player based on Component + MVP Base + MVP Customization + greenDAO + OkHttp3 + Retrofit + RxJava2; supports local and network music playback; can play Baidu music, Netease cloud music; support online music list , radio, MV, music online, download, local and online lyrics; Lyrics, music cache; self-built song list, song management, collection, sorting, sorting, skinning, sleep timing, mode switching, more settings, etc. 基于 Component + MVP Base + MVP Customization + greenDAO + OkHttp3 + Retrofit + RxJava2 的在线音乐播放器; 支持本地及网络音乐播放; 可播放百度音乐,网易云音乐; 支持在线音乐榜单, 电台, MV, 音乐在线播放,下载, 本地及在线歌词; 歌词, 音乐缓存; 自建歌单, 歌曲管理, 收藏, 排序, 分类, 换肤, 睡眠定时, 模式切换, 更多设置等
Stars: ✭ 121 (-6.2%)
Mutual labels:  cache
Moyamapper
快速解析模型工具,支持RxSwift。同时支持缓存功能 【相关手册 https://MoyaMapper.github.io 】
Stars: ✭ 115 (-10.85%)
Mutual labels:  cache
Bbwebimage
A high performance Swift library for downloading, caching and editing web images asynchronously.
Stars: ✭ 128 (-0.78%)
Mutual labels:  cache
Data Store
Easily get, set and persist config data. Fast. Supports dot-notation in keys. No dependencies.
Stars: ✭ 120 (-6.98%)
Mutual labels:  cache
Jpx
JPX - Java GPX library
Stars: ✭ 125 (-3.1%)
Mutual labels:  geolocation
Craft Blitz
Intelligent static page caching for creating lightning-fast sites with Craft CMS.
Stars: ✭ 118 (-8.53%)
Mutual labels:  cache
Lru Cache Node
A lighting fast cache manager for node with least-recently-used policy.
Stars: ✭ 120 (-6.98%)
Mutual labels:  cache
Gdeltpyr
Python based framework to retreive Global Database of Events, Language, and Tone (GDELT) version 1.0 and version 2.0 data.
Stars: ✭ 124 (-3.88%)
Mutual labels:  geolocation
Milkomeda
Spring extend componets which build from experience of bussiness, let developers to develop with Spring Boot as fast as possible.(基于Spring生态打造的一系列来自业务上的快速开发模块集合。)
Stars: ✭ 117 (-9.3%)
Mutual labels:  cache
Ml Projects
ML based projects such as Spam Classification, Time Series Analysis, Text Classification using Random Forest, Deep Learning, Bayesian, Xgboost in Python
Stars: ✭ 127 (-1.55%)
Mutual labels:  geolocation
Caches
LRU, LFU, FIFO cache C++ implementations
Stars: ✭ 115 (-10.85%)
Mutual labels:  cache
Cash
HTTP response caching for Koa. Supports Redis, in-memory store, and more!
Stars: ✭ 122 (-5.43%)
Mutual labels:  cache
Pokeapi Js Wrapper
PokeAPI browser wrapper, fully async with built-in cache
Stars: ✭ 129 (+0%)
Mutual labels:  cache
Nativescript Geolocation
Geolocation plugin to use for getting current location, monitor movement, etc
Stars: ✭ 127 (-1.55%)
Mutual labels:  geolocation
Kepler
The open source full-stack geosocial network platform
Stars: ✭ 125 (-3.1%)
Mutual labels:  geolocation

geocache GoDoc Go Report Card Build Status

geocache is an in-memory cache that is suitable for geolocation based applications. It uses geolocation as a key for storing items. You can specify range on initialization and thats it! You can store any object, it uses interface.

Installation

go get github.com/melihmucuk/geocache

Usage

geolocation cache


import (
	"fmt"
	"time"

	"github.com/melihmucuk/geocache"
)

func main() {
	c, err := geocache.NewCache(5*time.Minute, 30*time.Second, geocache.WithIn1KM)
	geoPoint := geocache.GeoPoint{Latitude: 40.9887, Longitude: 28.7817}
	if err != nil {
		fmt.Println("Error: ", err.Error())
	} else {
		c.Set(geoPoint, "helloooo", 2*time.Minute)
		v1, ok1 := c.Get(geocache.GeoPoint{Latitude: 41.2, Longitude: 29.3})
		v2, ok2 := c.Get(geocache.GeoPoint{Latitude: 41.2142, Longitude: 29.4234})
		v3, ok3 := c.Get(geocache.GeoPoint{Latitude: 40.9858, Longitude: 28.7852})
		v4, ok4 := c.Get(geocache.GeoPoint{Latitude: 40.9827, Longitude: 28.7883})
		fmt.Println(v1, ok1)
		fmt.Println(v2, ok2)
		fmt.Println(v3, ok3)
		fmt.Println(v4, ok4)
	}
}

outputs:

<nil>, false
<nil>, false
helloooo, true
helloooo, true

Information

You can specify 8 different range. More info can be found here.

  • WithIn11KM

The first decimal place is worth up to 11.1 km eg: 41.3, 29.6

  • WithIn1KM

The second decimal place is worth up to 1.1 km eg: 41.36, 29.63

  • WithIn110M

The third decimal place is worth up to 110 m eg: 41.367, 29.631

  • WithIn11M

The fourth decimal place is worth up to 11 m eg: 41.3674, 29.6316

  • WithIn1M

The fifth decimal place is worth up to 1.1 m eg: 41.36742, 29.63168

  • WithIn11CM

The sixth decimal place is worth up to 0.11 m eg: 41.367421, 29.631689

  • WithIn11MM

The seventh decimal place is worth up to 11 mm eg: 41.3674211, 29.6316893

  • WithIn1MM

The eighth decimal place is worth up to 1.1 mm eg: 41.36742115, 29.63168932

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].