# How to check session value in nginx conf

**URL:** <https://www.ruby-forum.com/t/how-to-check-session-value-in-nginx-conf/214951>\
**Category:** NGINX\
**Created:** [December 16, 2011, 4:06pm UTC](https://www.ruby-forum.com/t/how-to-check-session-value-in-nginx-conf/214951 "2011-12-16T16:06:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [December 16, 2011, 4:06pm UTC](https://www.ruby-forum.com/t/how-to-check-session-value-in-nginx-conf/214951/1 "2011-12-16T16:06:58Z")

</div>

I want to improve performance of nginx when using proxy\_cache, and want  
to check whether customer\_id exists in session, if not, I will use  
proxy\_cache to return the content, or else, it will request from  
proxy\_pass.

How can I write the config?

Thanks,  
Tiger Huang
