MySQL Config for server with 8gb RAM and 4 cpus
I'd agree with comment that asks for "purpose" of the mysql instance though these days you get decent configuration in-built provided with my.cnf. 

You should look to use them, my-large/huge/medium.cnf etc...
I see you have query cache and this link will help you understand best value for it.

Checkout this blog post for configuring few important parameters.
Finally I'd also like you to review this config wizard.

Again... none of this will give you exact and perfect config... Be ready to monitor and make according changes.