Skip to content

Basic documentation of cache plugin methods option - #174

Merged
Nyholm merged 4 commits into
php-http:masterfrom
tuupola:cache-methods
Feb 20, 2017
Merged

Basic documentation of cache plugin methods option#174
Nyholm merged 4 commits into
php-http:masterfrom
tuupola:cache-methods

Conversation

@tuupola

Copy link
Copy Markdown
Contributor

No description provided.

@dbudbu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you. i have some styling input and the thing we discussed on the code change, mention case sensitivity

Comment threadplugins/cache.rst Outdated

The third parameter to the ``CachePlugin`` constructor takes an array of options. The plugin has 3 options you can
The third parameter to the ``CachePlugin`` constructor takes an array of options. The plugin has four options you can
configure. Their default values and meaning is described by the table below.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just:

"The available options are:"

Comment threadplugins/cache.rst Outdated
+===========================+=====================+======================================================+
| ``default_ttl`` | ``0`` | The default max age of a Response |
+---------------------------+---------------------+------------------------------------------------------+
| ``respect_cache_headers`` | ``true`` | Whatever or not we should care about cache headers |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Whatever/Whether/

(i see you only reformatted this, but just jumped into my eyes)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe "Whether we should care about cache headers or not" would be proper english.

Comment threadplugins/cache.rst Outdated
'methods' => ['GET', 'HEAD', 'POST'],
];

You can cache any valid request method.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe:

"methods" overwrites the default methods, if you want to keep caching GET and HEAD requests, you need to repeat them. You can specify any request method that conforms to RFC-7230. Note that request methods are case sensitive, so post and POST are not the same.

dbu
dbu approved these changes Feb 16, 2017

@dbudbu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, looks good to me

@NyholmNyholm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it and I think it is good to merge if the PR gets merged at its current state.

Comment threadplugins/cache.rst Outdated
];

The ``methods`` setting overrides the defaults. If you want to keep caching ``GET`` and ``HEAD`` requests, you need
to include them. You can specify any request method that conforms to RFC-7230. Request methods are case sensitive,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Request methods are case sensitive,". I do not like this implementation. But I made some questions on the PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

php-http/cache-plugin#24 was now changed to force upper case. please change this line to say that.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, can #24 now be considered feature frozen?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i just merged php-http/cache-plugin#24 ;-)

Comment threadplugins/cache.rst Outdated
];

The ``methods`` setting overrides the defaults. If you want to keep caching ``GET`` and ``HEAD`` requests, you need
to include them. You can specify any request method that conforms to RFC-7230. Request methods are case sensitive,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

php-http/cache-plugin#24 was now changed to force upper case. please change this line to say that.

dbu
dbu approved these changes Feb 20, 2017
@dbu

dbu commented Feb 20, 2017

Copy link
Copy Markdown
Contributor

any other input or can we merge like this? should we maybe add some "since" notes?

@NyholmNyholm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

I do not think we need "since". All the docs relate to the latest version.

@Nyholm
Nyholm merged commit 627cf43 into php-http:masterFeb 20, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tuupola@dbu@Nyholm