You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/10/24 02:23:03 UTC

[GitHub] [apisix] niruntao opened a new issue, #8152: help request: how to use 'expires' and 'etag' in apisix?

niruntao opened a new issue, #8152:
URL: https://github.com/apache/apisix/issues/8152

   ### Description
   
   I have a piece of nginx code as below:
   
   location ~*\.(jpg|jpeg|gif|png|bmp|svgicon|ico|ttf|eot|woff|woff2|txt)$ {
       expires 30d;
       add_header 'Cache-Control' 'max-age=2592000';
       add_header 'Cache-Control' 'must-revalidate, private';
       add_header  Last-Modified $date_gmt;
       etag on;
       proxy_pass http://test_proxy;
   }
   
   I want to migrate it to apisix, but I can't find any plugins that support 'expires' and 'etag'. Among them, I implemented add_header with the plugin 'response-rewrite'.
   
   ### Environment
   
   - APISIX version (run `apisix version`): 2.13.1
   - Operating system (run `uname -a`): CentOS Linux release 7.9.2009 (Core)
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): nginx/1.17.3
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] niruntao commented on issue #8152: help request: how to use 'expires' and 'etag' in apisix?

Posted by GitBox <gi...@apache.org>.
niruntao commented on issue #8152:
URL: https://github.com/apache/apisix/issues/8152#issuecomment-1289916419

   > You can use the response-rewrite plugin if you want to maintain the same functionality in APISIX with the Nginx configuration pasted above.
   
   Okay, I'll try again.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on issue #8152: help request: how to use 'expires' and 'etag' in apisix?

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #8152:
URL: https://github.com/apache/apisix/issues/8152#issuecomment-1288333374

   try with [proxy-cache](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/proxy-cache.md) plugin.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] shreemaan-abhishek commented on issue #8152: help request: how to use 'expires' and 'etag' in apisix?

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #8152:
URL: https://github.com/apache/apisix/issues/8152#issuecomment-1707760034

   @niruntao any updates? If not, please close the issue. Thanks.
   
   P.S: proxy_cache now support memory based caching as well.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] niruntao commented on issue #8152: help request: how to use 'expires' and 'etag' in apisix?

Posted by GitBox <gi...@apache.org>.
niruntao commented on issue #8152:
URL: https://github.com/apache/apisix/issues/8152#issuecomment-1288529086

   > > I see expires is a configuration for the client-side cache
   > 
   > where did you saw this?
   
   I checked 'expires' on the official website of the nginx, but there is no description of how it implements the cache. Later, I checked the information on the Internet, and a blog post said that it is a client-side cache.
   
   https://nginx.org/en/docs/http/ngx_http_headers_module.html#expires
   
   http://t.zoukankan.com/Jackie-Chen-p-10640802.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] closed issue #8152: help request: how to use 'expires' and 'etag' in apisix?

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #8152: help request: how to use 'expires' and 'etag' in apisix?
URL: https://github.com/apache/apisix/issues/8152


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] niruntao commented on issue #8152: help request: how to use 'expires' and 'etag' in apisix?

Posted by GitBox <gi...@apache.org>.
niruntao commented on issue #8152:
URL: https://github.com/apache/apisix/issues/8152#issuecomment-1288469940

   > try with [proxy-cache](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/proxy-cache.md) plugin.
   
   The proxy-cache plugin caches the file on disk, and I see expires is a configuration for the client-side cache. In addition, if you run apisix in k8s cluster, you have to do the corresponding persistence. If you use proxy-cache, is the change too big?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] commented on issue #8152: help request: how to use 'expires' and 'etag' in apisix?

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8152:
URL: https://github.com/apache/apisix/issues/8152#issuecomment-1735223422

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on issue #8152: help request: how to use 'expires' and 'etag' in apisix?

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #8152:
URL: https://github.com/apache/apisix/issues/8152#issuecomment-1289237371

   > I checked 'expires' on the official website of the nginx, but there is no description of how it implements the cache. Later, I checked the information on the Internet, and a blog post said that it is a client-side cache.
   
   You can use the response-rewrite plugin if you want to maintain the same functionality in APISIX with the Nginx configuration pasted above.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] commented on issue #8152: help request: how to use 'expires' and 'etag' in apisix?

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8152:
URL: https://github.com/apache/apisix/issues/8152#issuecomment-1731152422

   Due to lack of the reporter's response this issue has been labeled with "no response". It will be close in 3 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] hf400159 commented on issue #8152: help request: how to use 'expires' and 'etag' in apisix?

Posted by GitBox <gi...@apache.org>.
hf400159 commented on issue #8152:
URL: https://github.com/apache/apisix/issues/8152#issuecomment-1288334601

   https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/proxy-cache.md  might solve your problem.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on issue #8152: help request: how to use 'expires' and 'etag' in apisix?

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #8152:
URL: https://github.com/apache/apisix/issues/8152#issuecomment-1288492589

   > I see expires is a configuration for the client-side cache
   
   where did you saw this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org