vcl

varnish 4.0 官方文档翻译12-VCL

馋奶兔 提交于 2019-11-29 22:31:17
VCL - Varnish Configuration Language 本节包含了怎样通过varnish配置语言vcl来通知varnish如何处理http请求。 varnish是高度结构化的系统。大多数其他的系统使用配置指令,在那里你基本上打开和关闭大量的开关。而我们选择使用领域特定语言,被叫做VCL,来完成之前的功能。 每个进入的请求流通过varnish,同时你可以支配如何通过VCL代码来处理请求。你可以让某些后端直接处理请求,你可以改变请求和响应,或者让varnish拥有各种各样动作依赖于特定的处理请求和响应的阶段。这些特性让Varnish变成特别强力的http程序,而不仅仅是缓存。 varnish转换VCL成二进制代码,当请求到达这些代码将被执行。VCL对varnish的性能损耗是可以忽略不计的。 VCL文件将子程序组织在一起。不同的子程序在不同阶段被执行。一个是在我们收到请求时执行,其他的当从后端收到文件时执行。 如果你在你的子程序不调用某个动作,varnish将执行一些built-in(内建)的VCL代码。你可以看到这些内建的代码在 builtin.vcl 中注释的部分 本节包含以下: VCL Syntax Built in subroutines Request and response VCL objects actions Backend servers

varnish 4.0 官方文档翻译13-VCL Syntax

戏子无情 提交于 2019-11-29 22:30:50
VCL Syntax varnish从C继承了很多,同时它读起来像简单的C或者是Perl。 块由大括号分隔,语句用分号结束,注释可以根据自己的喜好来写为C,C ++或Perl的注释。 注意VCL不包含任何循环和跳转语句。 本节提供大致最重要部分的语法。完整的VCL语法文档请查看 https://www.varnish-cache.org/docs/4.0/reference/vcl.html#reference-vcl Strings 基本的字符是被双引号引起来,像"...",同时不可以跨行。 反斜杠不是特别的,例如regsub你不需要对\进行转义: regsub("barf", "(b)(a)(r)(f)", "\4\3\2p") -> "frap" 长字符应该被{"..."}。它们可以包含任何字符包括"、跨行、除了NUL(0×00)字符等控制字符。如果你真的想字符串中使用NUL字符,VMOD,使得它可以创建这样的字符串。 Access control lists (ACLs) ACL申明创建和初始化一个权限控制列表,通常用来匹配客户端地址: acl local { "localhost"; // myself "192.0.2.0"/24; // and everyone on the local network ! "192.0.2.23"; // except for

how to store data on Firebase - Delphi XE 10

蹲街弑〆低调 提交于 2019-11-29 21:46:28
问题 What is the best way to connect to Google´s Firebase DBaaS from Embarcadero Delphi XE 10 ? I am not sure how to do it from AnyDAC. Or if exists a component out there (i coundnt find one on search) Any help? thank you 回答1: Firebase was acquired by Google and now makes available many tools and features (Cloud Messaging, Authentication, Realtime Database, Storage, Hosting etc...) If you are looking for a service that store and sync app data in realtime, the Realtime Database it's for you.

How to detect when the mouse move away from a TPanel in Delphi 6?

折月煮酒 提交于 2019-11-29 20:45:19
问题 I am using the OnMouseMove event to detect when the mouse pointer is over my TPanel, is there a way to know when the mouse pointer had moved away from it? I need the panel to change colour when the mouse pointer is over it and return to its original colour once it moved away from it? I am using Delphi 6 by the way. Please help. Best Regards. 回答1: Yet another solution, using TrackMouseEvent to receive WM_MOUSELEAVE ; type TMyPanel = class(TPanel) private FMouseTracking: Boolean; FOnMouseLeave:

How can I reduce PageControl flicker in Delphi?

时光总嘲笑我的痴心妄想 提交于 2019-11-29 19:06:41
问题 In Delphi 2009 I found that the flicker of a PageControl - which occurs during resizing of the form - can be reduced by setting its DoubleBuffered property to true. However if I add controls to the PageControl tabsheets, they will flicker regardless of their DoubleBuffered property setting. I have also tried with and without runtime themes enabled. 回答1: Setting ParentBackground to False for components on the PageControl helped a lot. However this results in a different color of these panel

Benchmarking affected by VCL

故事扮演 提交于 2019-11-29 15:37:49
Today I ported my old memory benchmark from Borland C++ builder 5.0 to BDS2006 Turbo C++ and found out weird thing. exe from BCB5 runs OK and stable exe from BDS2006 measure OK only before main Form is started (inside its constructor) and if the benchmark is started again after main form is Activated or even after any VCL component change (for example Caption of main form) then the speed of benchmark thread is strongly affected. After some research I found out that: Does not mater if test is inside thread or not. The process/thread priority,affinity does not affect this either. Hide of any

Make 2 forms able to overlap each other?

Deadly 提交于 2019-11-29 14:10:19
I would like to have a seperate form that shows "along" with my main form, so it does not overlap the main form. Here's an example: Notice how the main program, overlaps the log? I can't figure out how to do that in Delphi. Thanks! The answers to this question lie in the very useful Window Features MSDN topic. The pertinent information is: An overlapped or pop-up window can be owned by another overlapped or pop-up window. Being owned places several constraints on a window. An owned window is always above its owner in the z-order. The system automatically destroys an owned window when its owner

How do I make form or windowed control RecreateWnd-aware properly?

这一生的挚爱 提交于 2019-11-29 10:28:21
问题 As you know, window handles of windowed controls (this includes forms) are considered volatile. That is, setting some properties may cause control to destroy its window handle and then recreate (there is a bunch of examples of that technique, search StdCtrls for RecreateWnd ). So, when I need to register my HWND with OS after creation and unregister it before destruction I should override corresponding method pair. Brief look to Controls and Forms gave me 3 pairs, all of them virtual:

How can I make a form that is not disabled when another form is shown modally?

梦想的初衷 提交于 2019-11-29 03:23:06
问题 I have a utility dialog (non-modal and stay-on-top) that should be accessible at all times when using the application (think of a dialog that can be used to take notes while working with the application) even if a modal dialog is displayed . The rest of the application cannot be changed. Is it possible? How could I go about it? 回答1: When ShowModal is called, all existing top level windows are disabled. That's how modality is meant to work. If you have a window with which interaction is

How to make hovering over Minimize, Maximize, and Close buttons behave?

给你一囗甜甜゛ 提交于 2019-11-29 01:15:11
In a Delphi application, when you hover over a border icon, e.g.: Minimize Maximize Restore it doesn't behave correctly: Compare to an application that does behave correctly: Step to Reproduce Click File , New , VCL Forms Application - Delphi Click Run (F9) Hover over the Minimize, Maximize, or Close buttons. How to fix? Windows 10, 64-bit (running natively on desktop PC) Delphi XE6 Edit - It also fails with Delphi 7: and in Delphi 5: and in Delphi 4: I assumed (i.e. was afraid) that it was caused by the ThemeServices engine; where they might have thought it was cool to not honor the user's