#Caché

1 Follower · 4.5K Posts

  

InterSystems Caché is a multi-model DBMS and application server. See more details here.

Documentation.

Question Stephen Wilson · Aug 13, 2019

I have an OAuth 2.0 development environment where Caché is serving all three roles as the Authorization Server, Client and Resource Server based on a great 3-part series on OAuth 2.0 by @Daniel Kutac. I have a simple password grant type where an x-www-form-urlencoded body (as described in this post) is sent as a POST to the token endpoint at https://localhost:57773/oauth2/token and a response body with a HTTP Response 200 header is returned. The response body looks something like this.

3
0 2749
Question Kristina Roberts · Aug 12, 2019

Hi,

I am trying to use the  LogicialToDate method in the %Library.FilemanDate class.  In the class documentation it talks about the parameter STRICTDATA (see below).  I would like to set the STRICTDATA to a 1 but I am not sure how to do that when using this method because the method does not reference this as a parameter to be passed into it.  (see below).

How do I set the parameter?

Thanks

parameter STRICTDATA = 0;

4
0 267
Article Henry Pereira · Apr 11, 2019 10m read


 

Hello everyone,

I was first introduced to TDD almost 9 year ago, and I immediately fell in love with it. 
Nowadays it's become very popular but, unfortunately, I see that many companies don't use it. Moreover, many developers don't even know what it is exactly or how to use it, mainly beginners.

Overview

My goal with this article is to show how to use TDD with %UnitTest. I will show my workflow and explain how to use cosFaker, one of my first projects, which I created using Caché and recently uploaded to OpenExchange.

So buckle up and let's go.

What is TDD?

7
10 1647
Question Robert Gasper · Aug 8, 2019

Just wondering if anyone knows if there is a way to get daily emails or alerts about changes to a cache database.  I know that all of that information is contained within the journal files, just wondering if there is a way to bundle it up each day and send it off for auditing, etc.

Any solution where a plain-text/readable format of changes to the cache database could be sent or stored for review would solve the issue.

Thanks!

3
0 532
Question James Hipp · Jul 29, 2019

Hello,

I am struggling to print out the actual property values of the Security.System class.

https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.c…

I was hoping to be able to print the Authentication Enabled properties of a system from the command line using the Get or GetProperties class method. Currently, however, I am only able to get a return 1 or Invalid Oref error.

I would expect one of these to work, but I think I am missing something. Any tips?

%SYS>w ##class(Security.System).Get("AutheEnabled")

1

%SYS>w ##class(Security.System).GetProperties("AutheEnabled")

5
0 402
Question Token Ibragimov · Aug 8, 2019

Hello! I'm sending get request. When send the request bellow 

Set httprequest=##class(%Net.HttpRequest).%New()
Set httprequest.Server=url
Do httprequest.Get("/"_par1_"/"_par2)
 Set statusCode = httprequest.HttpResponse.StatusCode

I get http status 200, but should get 410 status. Since the parameters passed are not valid. 

If I send request differently as below, I get http status 410, which is correct. 

Do httprequest.Get("/2019/0912")

What is the difference between these two requests Do httprequest.Get("/"_par1_"/"_par2) and Do httprequest.Get("/2019/0912")?

8
1 407
Question Alexei Konoferchuk · Jun 6, 2019

Hello,

There is a problem connecting clients through ODBC.

"ERROR [08S01] [Cache ODBC][State : 08S01][Native Code 459]
Connection via cconnect failed: 
TCP connect() failed - exception satisfied select().
Reason: (10061, 0x274d) No connection could be made because the target machine actively refused it."

Error sometimes occurs. In cconsole.log there are only messages about high CPU usage.

ODBC and Cache version Cache for Windows (x86-64) 2013.1.4 (Build 801).

Any suggestions?

3
0 4117
Announcement Sourabh Sethi · Jul 29, 2019

A SOLID Design in Cache Object

In this session, we will discussing SOLID Principle of Programming and will implement in a example.
I have used Cache Object Programming Language for examples.
We will go step by step to understand the requirement, then what common mistakes we use to do while designing, understanding each principles and then complete design with its implementation via Cache Objects.

If you have any questions or suggestions, please write to me - sethisourabh.hit@gmail.com

CodeSet - https://github.com/sethisourabh/SolidPrinciplesTraining

7
2 547
Question infi livi · Aug 7, 2019

Hi All,

While Executing Custom SOAP fault got an error.Please help me out of this.

Sample Code:

set fault=##class(%SOAP.Fault).%New()
set fault.faultcode=$$$FAULTServer
set fault.detail="<mymessage>Division error detail</mymessage>"
set fault.faultstring="Division error"
// ReturnFault must be called to send the fault to the client.
// ReturnFault will not return here.
do ..ReturnFault(fault)

Error Details:

<ZSOAP>zReturnFault+3^%SOAP.WebService.1

Advance Thanks

1
0 436
Question Jereme Hall · Aug 7, 2019

For Cache client install automation, where are the remote server settings stored on a Windows 10 PC? 

Are they stored in the registry?  I found the Cache registry key, but it only lists the remote server address and not the ports.

Are they stored in an INI file?  If so, I haven't found it yet.

I can push the client install via the very helpful CEDocs URL (https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCI_windows_silentinst

2
0 464
Article David Crawford · Jul 31, 2019 2m read

IRIS provides us with anti login CSRF attack mitigation, however this is not the same as a CSRF attack, as login attacks only occur on the login form. There are currently no built-in tools to mitigate CSRF attacks on api calls and other forms, so this is a step in mitigating these attacks.

See the following link from OWASP for the definition of a CSRF attack:

https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)

5
1 779
Article Sean Connelly · May 31, 2017 28m read

Cogs Library

Over the next few months I will be releasing a number of open source libraries and tools to the Caché community.

Most of the code has evolved from previous production grade solutions over the years and I am collating it together under a single overarching library package that I am calling Cogs.

38
4 1623
Article Alexander Koblov · Jul 29, 2016 10m read

In this article we are going to compare $Increment and $Sequence functions.

First of all, a note for readers who have never heard of $Increment. $Increment is a Caché ObjectScript function which performs an atomic operation to increment its argument by 1 and return the resulting value. You can only pass a global or local variable node as a parameter to $Increment, not an arbitrary expression. $Increment is heavily used when assigning sequential IDs. In such cases parameter of $Increment is usually a global node. $Increment guarantees that each process using it gets a unique ID.

11
5 1920
Discussion Eduard Lebedyuk · Jul 31, 2019

Let's have a round of CodeGolf!

As usual the goal is to write the shortest solution for a specified problem.

Today we have one of the classics: FizzBuzz.

Write a program that prints the numbers from 1 to 100.

But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”.

For numbers which are multiples of both three and five print “FizzBuzz”

22
1 761
Question Zdeněk Bartušek · Jul 31, 2019

Hello community,

I need to know if there is any method which can me say specified imported files or namespaces in Cache.

To better specification of my problem, I've got two installer manifests. Firts one did some resource changing and import some files and classes, second one must be started after the first one, because it's only his update, which creates some nemaspaces. So i need to check if the first manifest ran succesful and I can start the second one.

Is it good way trying to do this by some method or are there some other, better ways maybe by ccontrol, I don't know?

1
0 243
Question James Hipp · Jul 29, 2019

Hello,

Is it possible to write global output values to STDOUT, in a similar way to how csession can take routine intput, like below:

(In Cache Terminal)

%SYS>d ##class(%SYSTEM.License).ShowSummary()

License Server summary view of active key.

     Distributed license use:

Current License Units Used =        1

Maximum License Units Used =        1

License Units   Authorized =      200

     Local license use:

Current Connections =      1  Maximum Connections =      1

Current Users       =      1  Maximum Users       =      2

(From Linux OS Terminal)

5
0 641
Question Zdeněk Bartušek · Jul 30, 2019

Good morning,

I'm trying to understand $ZF function, but only documentation isn't enought in this way. So my question is is there any possibility to get enviroment variable by this function into ensemble?

I've tried this as example from ducumentation, but there is an error and  I don't know why...

Thanks for your solutions.

Zdenek

17
0 1401
Article David Crawford · Jul 26, 2019 3m read

Hello community! I have to work with queries using all kinds of methods like embedded sql and class queries. But my favorite is dynamic sql, simply because of how easy it is to manipulate them at runtime. The downside to writing a lot of these is the maintenance of the code and interacting with the output in a meaningful way. In an effort to have as much dynamism as possible so that we're not rewriting code constantly, and so that we have as little code possible (while still making sense and getting the job done), I made a function that takes in any dynamic query and outputs a dynamic object.

7
2 1217
Question Dan Pahnke · Jul 23, 2019

Hello,

I've got a csp page that has successfully set up a websocket connection to a Cache class. When the websocket object's close function is triggered at the browser I was expecting one of the class' methods to fire at the server. The onclose method is triggered at the browser but nothing at the server. Is a method supposed to fire at the server?

Thanks,

Dan

Cache for Windows (x86-64) 2015.1.4 (Build 803_6) Tue May 15 2018 12:08:36 EDT

4
0 1258
Article Sean Klingensmith · Nov 18, 2016 10m read

As a developer, you have probably spent at least some time writing repetetive code. You may have even found yourself wishing you could generate the code programmatically. If this sounds familiar, this article is for you!

We'll start with an example. Note: the following examples use the %DynamicObject interface, which requires Caché 2016.2 or later. If you are unfamiliar with this class, check out the documentation here: Using JSON in Caché. It's really cool!

##Example

2
3 3506