Gin & Memcached memory
Hi, how can I run on Railway "memcached store" if there is already a service of my api running on one of the ports suggested by railway. I can't run memcache through it, code for context. Now I tried to use the port suggested but it is known that it will be rejected, because the memcache service will not run on such a port.
What is the solution for this?
21 Replies
Project ID:
2d40044f-0bf7-475d-b975-0972037db8ba
2d40044f-0bf7-475d-b975-0972037db8ba
And yeah, now i get this response because of not running service of memcache
can you share your repo please?
yeap, but you need to give me your email or username for gh
brody192
send invite
branch 7-auth-page
viper-backend
folder
i dont see anything thats gonna start the memcached server?
in api.go - mc = memcache.New
i've just changed to use port dedicated for gin for the test
and yeah outcome is error
thats a client? no?
yeah
mc *memcache.Client
and memcache.New
starting client
but dont you need to run a memcached server?
memcache.New is creating a server and running in one
https://github.com/bradfitz/gomemcache
This is a memcache client library.New returns a client from given servers
I think i found the problem, but i need to test it.
the problem is that youre thinking a client library is creating a server
this library connects to a server, it doesn’t run a server
actually, my mistake - it's already too late for me I guess, thanks for suggesting it, because I would have been thinking all the time
why not just use an in memory cache library for go?
or redis
i will use it now
forget my previous recommendations, you are saving users in the cache, instead you want to be using postgre or mysql for this