Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to specify the cache size? #21

Closed
ncri opened this issue Mar 22, 2016 · 15 comments
Closed

How to specify the cache size? #21

ncri opened this issue Mar 22, 2016 · 15 comments

Comments

@ncri
Copy link

ncri commented Mar 22, 2016

I don't see any info about that in the readme.

Thanks,
Nico

@ncri
Copy link
Author

ncri commented Mar 31, 2016

Any info on this?

@ncri
Copy link
Author

ncri commented Apr 1, 2016

Okay, I see it's hardcoded to 64. I guess we could allow optionally passing it in on create. Thought's?

@josegonzalez
Copy link
Member

Works for me. PRs welcome.

@josegonzalez
Copy link
Member

Proposal for how this might work:

# via env var
export MEMCACHED_MEMORY="64"
dokku memcached:create lolipop

# via flag
dokku memcached:create lolipop --memory 64

We'd need to store that value in a file somewhere.

@josegonzalez
Copy link
Member

Closing in favor of a rather large rfc here: dokku/dokku-redis/issues/64

@Friss
Copy link

Friss commented May 11, 2017

@josegonzalez Any chance the configuration outlined in the RFC could be implemented for memcached?

@josegonzalez
Copy link
Member

Probably, though it hasn't been implemented anywhere due to lack of time. If you'd like to sponsor the development of that, please contact me via irc or slack (I'm savant on both).

@josegonzalez
Copy link
Member

This is now implemented.

@ncri
Copy link
Author

ncri commented Aug 27, 2017

Great, thanks!

@jarthod
Copy link
Contributor

jarthod commented Apr 3, 2020

Was looking for this too, apparently it's implemented but it's not in the Readme, also I don't see the size in memcached:info, is this because it's alpha version still or can we use it and add some documentation? (happy to contribute of course)

Thanks!

@josegonzalez
Copy link
Member

Docs aren't auto-generated from the code and I'm lazy about fixing that - maybe someday! - but for now you can try:

dokku memcached:help create

To see how to configure that sort of flag.

@jarthod
Copy link
Contributor

jarthod commented Apr 3, 2020

How nice, didn't saw that command ^^ though it doesn't say anything about the memory flag either so the code is not even in the code I suppose?

> dokku memcached:help create
usage: dokku memcached:create <service> [--create-flags...]

create a Memcached service

arguments:

service   service to run command against

flags:

-C|--custom-env "USER=alpha;HOST=beta"   semi-colon delimited environment variables to start the service with
-i|--image IMAGE                         the image name to start the service with
-I|--image-version IMAGE_VERSION         the image version to start the service with
-p|--password PASSWORD                   override the user-level service password
-r|--root-password PASSWORD              override the root-level service password

examples:

create a memcached service named lolipop

    dokku memcached:create lolipop

you can also specify the image and image version to use for the service.
it *must* be compatible with the memcached image.

    export MEMCACHED_IMAGE="memcached"
    export MEMCACHED_IMAGE_VERSION="1.5.20"
    dokku memcached:create lolipop

you can also specify custom environment variables to start
the memcached service in semi-colon separated form.

    export MEMCACHED_CUSTOM_ENV="USER=alpha;HOST=beta"
    dokku memcached:create lolipop

@josegonzalez
Copy link
Member

Seems missing from the docs, but try --memory.

@jarthod
Copy link
Contributor

jarthod commented Apr 3, 2020

Sure, it works, but I shall try to improve the documentation then if you don't mind.
Is it only in:

Something like:

  #F -m|--memory MEMORY, in MB, override the cache size (default to 64MB)

?

@josegonzalez
Copy link
Member

Sounds right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants