Can't enable MySQL 5.6 Query Cache
You shouldn't put those lines at the very bottom of the file.

Look for the [mysqld] group header in my.cnf and put those lines under it

[mysqld]
query_cache_type = 1
query_cache_size = 4096M
query_cache_limit = 2M
query_cache_strip_comments =1


Those line cannot go under any other group header.

Then, restart mysqld.