1: <?php
2: /**
3: * PHP OpenCloud library.
4: *
5: * @copyright Copyright 2013 Rackspace US, Inc. See COPYING for licensing information.
6: * @license https://www.apache.org/licenses/LICENSE-2.0 Apache 2.0
7: * @version 1.6.0
8: * @author Glen Campbell <glen.campbell@rackspace.com>
9: * @author Jamie Hannaford <jamie.hannaford@rackspace.com>
10: */
11:
12: namespace OpenCloud\LoadBalancer\Resource;
13:
14: /**
15: * When content caching is enabled, recently-accessed files are stored on the
16: * load balancer for easy retrieval by web clients. Content caching improves the
17: * performance of high traffic web sites by temporarily storing data that was
18: * recently accessed. While it's cached, requests for that data will be served
19: * by the load balancer, which in turn reduces load off the back end nodes. The
20: * result is improved response times for those requests and less load on the web
21: * server.
22: *
23: * @todo Should this be a separate class, or a property of LoadBalancer?
24: */
25: class ContentCaching extends SubResource
26: {
27: /**
28: * @var bool
29: */
30: public $enabled;
31:
32: protected static $json_name = "contentCaching";
33: protected static $url_resource = "contentcaching";
34:
35: protected $createKeys = array('enabled');
36:
37: public function create($params = array())
38: {
39: return $this->update($params);
40: }
41:
42: public function delete()
43: {
44: return $this->noDelete();
45: }
46:
47: }
48: